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

Phil Wilson phil.wilson at mvps.org
Wed Nov 4 12:29:43 PST 2015


..and of course Immediate is not a good idea either because it will
unregister something, then the uninstall might fail, roll back and leave a
broken product, and of course doing registration like this is a proverbial
"bad thing" and should be done with registry or service elents, depending on
what's going on. 

Phil 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Hoover, Jacob
Sent: Wednesday, November 04, 2015 8:15 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Executing installed exe as a first action during
Unintall

asyncNoWait

You are telling Windows Installer to not wait until that CA is done before
continuing on.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Farrukh Waheed
Sent: Tuesday, November 03, 2015 10:06 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Executing installed exe as a first action during
Unintall

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.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/




More information about the wix-users mailing list