There are 2 places to look. The first is defining them, which is what you included.
<CustomAction Id='InstallSvc' Directory='INSTALLFOLDER' Execute='commit' ExeCommand='[INSTALLFOLDER]IntegrationFramework.exe install --sudo' Return='check'> </CustomAction> The second is in the InstallExecute or InstallUI sequence, where you use <InstallExecuteSequence> ... <Custom Action='InstallSvc' Before='InstallFinalize'> NOT Installed </Custom> </InstallExecuteSequence> -----Original Message----- From: racingcow [mailto:racing...@hotmail.com] Sent: Tuesday, September 18, 2012 7:03 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Uninstall Custom Action Always Executing Hello, I am trying to use WiX v3.7.910.0 to create an installer in Visual Studio 2012 (4.5 Framework) . My executable file uses TopShelf (http://topshelf-project.com/), which auto-installs via a command line. I have a couple of custom actions that install and start the service, as shown below ... <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <Component Id="IntegrationFramework.exe" Guid="01163074-63CB-4F2A-A261-BD7AE8FB5DE6"> <File Source="$(var.IntegrationFramework.TargetDir)\IntegrationFramework.exe" /> </Component> ... </ComponentGroup> ... <CustomAction Id='InstallSvc' Directory='INSTALLFOLDER' Execute='commit' ExeCommand='[INSTALLFOLDER]IntegrationFramework.exe install --sudo' Return='check'> <RULE GOES HERE> </CustomAction> <CustomAction Id='StartSvc' Directory='INSTALLFOLDER' Execute='commit' ExeCommand='[INSTALLFOLDER]IntegrationFramework.exe start --sudo' Return='check'> <RULE GOES HERE> </CustomAction> I am confused about how to ensure that the custom actions only run during install time. All the examples I have seen online state that a rule needs to be placed in the <RULE GOES HERE> section, but I have tried the following values and the custom actions seem to run on both installs and uninstalls... "NOT Installed" "$IntegrationFramework.exe=3" "(REMOVE<>'ALL')" It is as if the rule is being ignored. For each of those values my custom actions run during install (which is fine) but it also runs during uninstall (which I don't want). Also, the WiX 3 documentation for the CustomAction element at http://wix.sourceforge.net/manual-wix3/wix_xsd_customaction.htm says... "The text node is only valid if the Script attribute is specified. In that case, the text node contains the script to embed." That seems to indicate that <RULE GOES HERE> will indeed be ignored in my case, since I am not using a script. What is the correct way for me to ensure that a custom action only runs during the install but not during the uninstall? -David -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Uninstall-Custom-Action-Always-Executing-tp7580642.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users