[wix-users] How to run a custom action on uninstall that runs as localhost and runs as early as possible
Christopher Painter
chrpai at iswix.com
Sat May 16 10:48:52 PDT 2020
If your calling an EXE I'd look at the WiX Quiet Execute Custom Action pattern. As for running as early as possible, you want to schedule it after InstallInitialize. Scheduling it before InstallFinalize is about as late as it can be and is happening after the file is being removed.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Angus Comber via wix-users <wix-users at lists.wixtoolset.org>
Sent: Saturday, May 16, 2020 12:16 PM
To: Wix users list <wix-users at lists.wixtoolset.org>
Cc: Angus Comber <anguscomber at gmail.com>
Subject: [wix-users] How to run a custom action on uninstall that runs as localhost and runs as early as possible
I need to run a custom action on uninstall that performs some special
actions. To run this exe it needs to be running as localhost, so I cannot
set Impersonate="yes" but I thought when you used Impersonate="no" that you
had to run Execute="deferred"? If that is the case then maybe that is the
problem.
Here is my custom action:
<CustomAction Id="remove_server_CA"
Execute="deferred"
Impersonate="no"
Return="asyncNoWait"
FileKey="remove_server.exe"
ExeCommand="[INSTALLFOLDER]" />
<InstallExecuteSequence>
<Custom Action="remove_server_CA" Before="InstallFinalize">(NOT
UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
</InstallExecuteSequence>
This custom action does not see to run at all.
How can I get this custom action to successfully run?
Angus
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list