-1

I have a WiX installer which does some work, and at the end, launch RSYNC installer (it's an EXE file, no problem to have both working at same time).

But when uninstalling, I want to remove RSYNC too.

<CustomAction Id="InstallRSyncDaemon" FileKey="cwRsyncServer_4.0.5_Installer.exe" ExeCommand="/q" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="UninstallRSyncDaemon" FileKey="rsync_uninstall.bat" ExeCommand="[INSTALLDIR]" Execute="deferred" Return="check" Impersonate="no" />
<CustomAction Id="EditConf" FileKey="rsync.bat" ExeCommand="[INSTALLDIR]" Execute="deferred" Return="ignore" Impersonate="no"/>

<InstallExecuteSequence>
  <Custom Action='InstallRSyncDaemon' Before='InstallFinalize'>(NOT remove="ALL")</Custom>
  <Custom Action='EditConf' After='InstallRSyncDaemon'>(NOT remove="ALL")</Custom>
  <Custom Action='UninstallRSyncDaemon' Before='RemoveFiles'>remove="ALL"</Custom>
</InstallExecuteSequence>

My problem is that during uninstalling, the Custom Action 'UninstallRSyncDaemon' is skipped:

MSI (s) (58:78) [17:37:40:475]: Skipping action: UninstallRSyncDaemon (condition is false)

I have tried with "installed" and other conditions, with the same result.

At the beginnning of the log file, I have:

MSI (c) (9C:80) [17:37:36:772]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (c) (9C:80) [17:37:36:772]: Doing action: INSTALL
Action 17:37:36: INSTALL.
Action start 17:37:36: INSTALL.
MSI (c) (9C:80) [17:37:36:772]: UI Sequence table 'InstallUISequence' is present and populated.
MSI (c) (9C:80) [17:37:36:772]: Running UISequence
MSI (c) (9C:80) [17:37:36:772]: PROPERTY CHANGE: Adding EXECUTEACTION property. Its value is 'INSTALL'.

If I try to change to the condition to launch it during installation, it is working, so for me it is just the statement of the condition.

But I do not understand why, this is the condition always used in a tutorial or in an answer on Stack Overflow.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
pierre
  • 1
  • 1
  • What if the user has installed RSync themselves? What if another installer for a program that depends on RSync takes the same approach? Seems a very short-sighted "my program is the only one that matters" approach. – Damien_The_Unbeliever Jun 04 '13 at 06:35

1 Answers1

0

I think the remove should be in upper case. Try this.

REMOVE="ALL"

But it will run in modify and Upgrade also. Check more about this condition here.

Community
  • 1
  • 1
Vinoth
  • 1,975
  • 21
  • 34