Installing a service via a Windows Installer Class in an EXE.
I added an "Uninstall" CA (Custom Action) after "Preparing" stage.
After the "Add Resources" stage I added (in this top-down order);
COMMIT CA
ROLLBACK CA
Install (DEFERRED) CA
The problem is my "Install" CA runs but pops an Error 101 indicating that my service already exists.
Based on the logfile snippet below it looks like my "commit CA" runs before the "install CA" and I'm not sure why:
Line 3284: MSI (s) (18:D0) [13:59:43:149]: Executing op: ActionStart(Name=InstallServices,Description=Installing new services,Template=Service: [2])
Line 3288: MSI (s) (18:D0) [13:59:46:935]: Executing op: ActionStart(Name=StartServices,Description=Starting services,Template=Service: [1])
Line 3291: MSI (s) (18:D0) [13:59:46:955]: Executing op: ActionStart(Name=COMMIT_SERVICE.4E72A4E1538744C6A2EC5B2DE0D2CEDE,,)
Line 3294: MSI (s) (18:D0) [13:59:46:955]: Executing op: ActionStart(Name=ROLLBACK_SERVICE.4E72A4E1538744C6A2EC5B2DE0D2CEDE,,)
Line 3297: MSI (s) (18:D0) [13:59:46:955]: Executing op: ActionStart(Name=Add_WCF9010,,)
Line 3300: MSI (s) (18:D0) [13:59:46:955]: Executing op: ActionStart(Name=Add_WCF9011,,)
Line 3303: MSI (s) (18:D0) [13:59:46:955]: Executing op: ActionStart(Name=RefreshEnv,,)
Line 3306: MSI (s) (18:D0) [13:59:46:955]: Executing op: ActionStart(Name=RegisterProduct,Description=Registering product,)
Line 3314: MSI (s) (18:D0) [13:59:48:056]: Executing op: ActionStart(Name=MsiPublishAssemblies,Description=Publishing assembly information,Template=Application Context:[1], Assembly Name:[2])
Line 3486: MSI (s) (18:D0) [13:59:48:096]: Executing op: ActionStart(Name=PublishFeatures,Description=Publishing Product Features,Template=Feature: [1])
Line 3492: MSI (s) (18:D0) [13:59:48:096]: Executing op: ActionStart(Name=PublishProduct,Description=Publishing product information,)
Line 3526: MSI (s) (18:D0) [13:59:48:107]: Executing op: ActionStart(Name=INSTALL_SERVICE.4E72A4E1538744C6A2EC5B2DE0D2CEDE,,)
The commit one is marked; synch check return, commit with no impersonation when condition when $main_executbale > 2
The "install" CA is marked; synch check return, deferred with no impersonation when condition (Not installed).
Almost seems like the order in the top-down tree of action sequences matters.
FOLLOW US
Get the latest news in Application Packaging