> Can anyone explain what the wix custom actions do in the case of a > rollback, specifically for Virtual Directories, WebSites, and Application Pools.
The StartMetabaseTransaction custom action, scheduled by the ConfigureIIs custom action, backs up the metabase before any changes are made. On rollback, the RollbackMetabaseTransaction CA runs, which restores the backup made by StartMetabaseTransaction. On commit, the CommitMetabaseTransaction CA runs, which simply deletes the metabase backup. To follow along, the IIS extension's Wix code lives at src\ext\IIsExtension\wixlib\IIsExtension.wxs (WiX 3.0) or src\ca\serverca\scawixlib\sca.wxs (WiX 2.0). If you use one of the IIS configuration elements, the compiler (in src\wix\Compiler.cs for WiX 2.0, or src\ext\IIsExtension\wixext\IIsCompiler.cs for WiX 3.0) adds a reference to the ConfigureIIs action to the CustomAction table; this reference is resolved by the linker, which includes the <Fragment> that ConfigureIIs lives in. At runtime, the ConfigureIIs action (if linked in) runs as part of the install execute sequence. When run, it schedules the StartMetabaseTransaction, RollbackMetabaseTransaction and CommitMetabaseTransaction CAs, which are all deferred and so are simply written into the script to be executed during the deferred execution phase. The ConfigureIIs action then converts everything in the associated tables built by the compiler (from <WebSite>, <WebVirtualDir>, etc elements) into the CustomActionData property for the WriteMetabaseChanges CA, which is scheduled right at the end of the ConfigureIIs function (src\ca\serverca\scasched\scasched.cpp). Packing the contents of the tables into the CustomActionData property is necessary because deferred CAs cannot read the tables directly. In the deferred execution phase, the service part of Windows Installer reads the script and runs the custom actions in the order they were written into the script (rollback and commit CAs are obviously run only on rollback, or when all other actions have completed successfully, respectively). The deferred custom actions live in scaexec.dll while the ConfigureIIs action lives in scasched.dll. There are separate DLLs because this is required by some early versions of Windows Installer - a custom action in one DLL could not schedule custom actions in the same DLL. -- Mike Dimmick ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users