Return="check"
>
</CustomAction>
+ <CustomAction Id="UnRegisterCom_Rollback"
+ ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMUnregister'
+ Execute="rollback"
+ Property="rundll"
+ Impersonate="no"
+ Return="check"
+ >
+ </CustomAction>
<?endif?>
<Feature Id="QEMUFeature" Title="QEMU Guest Agent" Level="1">
<InstallExecuteSequence>
<?ifdef var.InstallVss?>
- <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom>
- <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom>
+ <!-- Use explicit Sequence number to provide an absolute position in the sequence-->
+ <!-- This is needed to set "UnRegisterCom_Rollback" before "RegisterCom" and after "InstallFiles"-->
+ <!-- but, Wix detect this double condition incorrectly -->
+
+ <!-- UnRegisterCom_Rollback (for install rollback): at 5849, right before RegisterCom (5850)-->
+ <!-- Runs only if the installation fails and rolls back-->
+ <Custom Action="UnRegisterCom_Rollback" Sequence="5849">NOT REMOVE</Custom>
+
+ <!-- RegisterCom (for install): at 5850, right after InstallFiles (5849) (old: After="InstallServices")-->
+ <Custom Action="RegisterCom" Sequence="5850">NOT REMOVE</Custom>
+
+ <!-- UnRegisterCom (for uninstall): at 1901, right after StopServices (1900) (old: After="StopServices")-->
+ <Custom Action="UnRegisterCom" Sequence="1901">Installed</Custom>
<?endif?>
</InstallExecuteSequence>
</Product>