How to perform custom actions only during installation (do not remove)

I'm sure this is pretty easy, but it was hard for me to handle it. I have a custom action that installs (non-msi) during installation. Unfortunately, I noticed that it also launches the installer in UNinstallation!

I looked through the options, but I cannot figure out how to stop this. If anyone could help me, I would be incredibly grateful.

Also, how to configure a custom action for uninstall only during UNinstall? Any help really appreciated guys!

+67
installer windows-installer installshield
Feb 11 '09 at 16:25
source share
5 answers

Add a condition to the action, so it runs only during installation, and not during removal.

The action is performed only during installation.

NOT Installed AND NOT PATCH 

The action is performed during installation and recovery.

 NOT REMOVE 

It is carried out only at initial installation:

 NOT Installed 

Startup during initial installation or when selecting a mode.

 NOT Installed OR MaintenanceMode="Modify" 

To perform only an action during deletion, use the following condition:

 REMOVE~="ALL" 

To perform an action only during the upgrade:

 Installed AND NOT REMOVE 
+151
Feb 11 '09 at 21:25
source share

A little correction:

Finally, to run only during deletion, use the following condition: REMOVE="ALL"

This seems more appropriate since the REMOVE property contains functions to delete.
Therefore, if I make a modification to delete one function, REMOVE is true, and the action, which should have been performed only when deleting, is performed during the modification.
Read more here on MSDN

+7
Apr 6 '11 at 19:29
source share

Example:

 <InstallExecuteSequence> .. <Custom Action="QtExecIdOfCA" Before="InstallFinalize">NOT Installed</Custom> .. </InstallExecuteSequence> .. .. <CustomAction Id="QtExecIdOfCA" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/> 

Notification! The condition is added to the <Custom> and not the <CustomAction> , it confused me, because Custom followed actions

+5
Feb 24 '14 at 11:45
source share

Please be careful with REMOVE=ALL . It is not available before installation.
And check the links below for more details:
http://msdn.microsoft.com/en-us/library/aa371194(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/aa368013(v=vs.85).aspx

+4
Jan 02 '14 at 16:32
source share

A condition for a user action, possibly with a corresponding user action for deletion. You do not know what tools you use, but if the secondary installation is tied to a component, I would use this state of the component. State = 3 means the target state of the installed. State = 2 means the final state is absent. Please note that the status will not be established if there are no changes.

0
Feb 11 '09 at 21:41
source share



All Articles