windows installer multi package transaction. multi-package transaction 8/6/2015microsoft...

5
Windows Installer Multi Package Transaction

Upload: dorcas-bradley

Post on 22-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Windows Installer Multi Package Transaction. Multi-Package Transaction 8/6/2015Microsoft Confidential2 Foo.msi Chainer Transaction RollbackUninstall Foo.msi

Windows Installer Multi Package Transaction

Page 2: Windows Installer Multi Package Transaction. Multi-Package Transaction 8/6/2015Microsoft Confidential2 Foo.msi Chainer Transaction RollbackUninstall Foo.msi

Multi-Package Transaction

04/19/23 Microsoft Confidential 2

Foo.msi

Chainer Transaction

RollbackUninstall

Foo.msi

Install

Bar.msi Failure

Rollback

Install

Bar.msi Failure

Install

Page 3: Windows Installer Multi Package Transaction. Multi-Package Transaction 8/6/2015Microsoft Confidential2 Foo.msi Chainer Transaction RollbackUninstall Foo.msi

Windows Installer Transaction Terminology

04/19/23 Microsoft Confidential 3

Foo.msi

Install

Disk

Acquisition: Determine the state of the system and create an install script to run at a later time.

Ex: What version of foo.dll is installed?

Execution: Run the install script created to update the state of the system. While updating the system, create a rollback script for usage when needed.

Ex: Copy foo.dll to the disk.

Commit: Finalize the transaction. There is no way to undo a commit.

Ex: Commit assemblies to GAC.Acquisition Phase

Execution Phase

Commit Phase

Rollback

Page 4: Windows Installer Multi Package Transaction. Multi-Package Transaction 8/6/2015Microsoft Confidential2 Foo.msi Chainer Transaction RollbackUninstall Foo.msi

Vista MSI Transaction: Under the hoods

Foo.msi

Costing

Acquisisition Contd

Triggers install script creation

Install ScriptStopService(…)…ScheduleCA(SetupIIS…)…FileCopy(…)ApplyPatch(…)…

Triggers script executionDisk

Install/Update disk based on the contents of the install script

Windows Installer Executor

Rollback ScriptStartService(…)...ScheduleCA(RollbackSetupIIS…)…FileCopy(…)…

Read from the install script

Store the undo operations into a rollback script

Page 5: Windows Installer Multi Package Transaction. Multi-Package Transaction 8/6/2015Microsoft Confidential2 Foo.msi Chainer Transaction RollbackUninstall Foo.msi

Windows Installer Multi Package Transaction Semantics

04/19/23 Microsoft Confidential 5

Foo.msi

Install

Acquire the state of the machine.Ex: Check the version of Foo.exe and decide if you want to copy Foo.exe.

Acquisition Early Execution

Fool.msi

Acquisition Early Execution

Update the state of the machine using the install script created in acquisition phase.Sample operations: 1.Backup Foo.exe if one exists.2.Create an undo op-code for this operation.3.Copy Foo.exe.

Acquire the state of the machine.Update the system.1. Backup the old version of Fool. 2. Note down an undo op-code in rollback script.3. Copy Fool.exe.

Late Commit

FailureRollback

Run the rollback scripts for Fool and Foo in LIFO order to rollback the transaction