Alex, Excellent suggestion. I've implemented the suggestion (see below). Is this essentially deferring an install action until the moment that the uninstall starts? The CustomAction events fire correctly ("caInstall" on install, and "caUninstall" on uninstall) and the command line options are correctly passed and handled by the executable.
On Vista, however, the "caUninstall" event fires before the UAC prompt, which appears to cause the uninstall to run under different privileges. Is it possible to trigger the uninstall action later in the uninstall process? (BTW - I've tested setting the "Impersonate" attribute to "yes" with no change in behavior.) <Binary Id="binInstallExe" SourceFile="..\Build\Release\Install.exe" /> <CustomAction Id="caInstall" BinaryKey="binInstallExe" ExeCommand="/install" Execute="deferred" Return="check" HideTarget="no" Impersonate="no" /> <CustomAction Id="caUninstall" BinaryKey="binInstallExe" ExeCommand="/uninstall" Execute="immediate" Return="check" HideTarget="no" Impersonate="no" /> <InstallExecuteSequence> <Custom Action="caInstall" Before="InstallFinalize">NOT (REMOVE="ALL")</Custom> <Custom Action="caUninstall" After="InstallValidate">REMOVE="ALL"</Custom> </InstallExecuteSequence> -----Original Message----- From: Alex Shevchuk [mailto:shevc...@live.com] Sent: Thursday, July 02, 2009 2:09 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Custom action behavior on Install vs Uninstall >Can a Type 18 custom action have a dynamically designated command line >property such that the target executable of the custom action is aware >that it is being executed during installation or uninstallation? If so, >what internal variable can be used to determine the current condition of >the MSI? Hi Alan, Instead of changing target, schedule two custom actions: one conditioned on running during fresh install (and maintenance install if needed) and another one conditioned on uninstall. See http://msdn.microsoft.com/en-us/library/aa368013(VS.85).aspx for details. Alex ------------------------------------------------------------------------ ------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users