50 likes | 262 Views
Windows Installer Multi Package Transaction. Multi-Package Transaction. Chainer Transaction. Install. Install. Install. Failure. Foo.msi. Bar.msi. Foo.msi. Bar.msi. Failure. Uninstall. Rollback. Rollback. Windows Installer Transaction Terminology.
E N D
Multi-Package Transaction Chainer Transaction Install Install Install Failure Foo.msi Bar.msi Foo.msi Bar.msi Failure Uninstall Rollback Rollback Microsoft Confidential
Windows Installer Transaction Terminology 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? Rollback Install Acquisition Phase Commit: Finalize the transaction. There is no way to undo a commit. Ex: Commit assemblies to GAC. Execution Phase Foo.msi Disk Commit Phase 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. Microsoft Confidential
Vista MSI Transaction: Under the hoods Install Script StopService(…) … ScheduleCA(SetupIIS…) … FileCopy(…) ApplyPatch(…) … Costing AcquisisitionContd Rollback Script StartService(…) ... ScheduleCA(RollbackSetupIIS…) … FileCopy(…) … Read from the install script Triggers install script creation Triggers script execution Windows Installer Executor Install/Update disk based on the contents of the install script Foo.msi Store the undo operations into a rollback script Disk
Windows Installer Multi Package Transaction Semantics Acquisition Late Commit Early Execution Acquisition Early Execution Install Failure Fool.msi Foo.msi Rollback • Update the state of the machine using the install script created in acquisition phase. • Sample operations: • Backup Foo.exe if one exists. • Create an undo op-code for this operation. • 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. Acquire the state of the machine. Ex: Check the version of Foo.exe and decide if you want to copy Foo.exe. • Run the rollback scripts for Fool and Fooin LIFO order to rollback the transaction Microsoft Confidential