[wix-users] Executing installed exe as a first action during Unintall

Farrukh Waheed farrukh1 at gmail.com
Tue Nov 3 20:05:49 PST 2015


Hi
In my msi, I have to call the installed exe file with some parameters, as a
very first action of uninstall. Here is the code:

    <CustomAction Id="UnRegisterOnUninstallApplication"
  Execute="immediate"                  FileKey="MyProgram.exe"
ExeCommand="/unregister"  Return="asyncNoWait" />
     <InstallExecuteSequence>      <RemoveExistingProducts
After="InstallInitialize"/>      <Custom
Action="UnRegisterOnUninstallApplication"
Before="UnpublishComponents" >Installed AND NOT
UPGRADINGPRODUCTCODE</Custom>    </InstallExecuteSequence>

Although, it is scheduled Before UnpublishComponents, but issue is, at
some computers, custom action is called during or after dependency
dlls are uninstalled and so MyProgram.exe crashes here.
This is something seems unpredictable...

Can anyone please guide, if I'm missing something or doing something wrong???

Thanks a bunch.


More information about the wix-users mailing list