Not possible. Rollback Custom Actions executed differently to normal
ones so you will need both. See ->
http://msdn.microsoft.com/en-us/library/aa371369.aspx 

Also you don't need an Execute attribute on Type 51 custom actions.
They're only setting properties so they happen immediately anyway.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: Kiran Challa [mailto:kicha...@microsoft.com] 
Sent: 22 April 2010 17:14
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Referencing a command from a Rollback & Uninstall
custom action to avoid duplication

Hi,

This question is from a maintenance perspective where currently I am
duplicating the same command in a Rollback custom action and a Uninstall
custom action.

If you notice from the following example, I am duplicating the command
for the rollback action "SetBtsAddAppRollback" in the uninstall action
"SetBtsRmvApp" also.

I would like to avoid this duplication...Can you please suggest how
could I make these 2 custom actions reference a single declaration of a
command (I mean, let's say you declare this command somewhere and both
these custom actions reference it)?


Example:

<CustomAction Id="SetBtsAddAppRollback" Property="RunBtsAddAppRollback"
Execute="immediate" Value="&quot;[BTS09TSK]&quot; removeApp
/applicationName:&quot;!(loc.BiztalkApplicationName)&quot;" />
<CustomAction Id="RunBtsAddAppRollback" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="rollback" Return="ignore" />

  <CustomAction Id="SetBtsAddApp" Property="RunBtsAddApp"
Value="&quot;[BTS09TSK]&quot; addApp
/applicationName:&quot;!(loc.BiztalkApplicationName)&quot;
/description:&quot;!(loc.BiztalkApplicationName)&quot;" />
  <CustomAction Id="RunBtsAddApp" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="deferred" Return="check" />


  <CustomAction Id="SetBtsRmvApp" Property="RunBtsRmvApp"
Value="&quot;[BTS09TSK]&quot; removeApp
/applicationName:&quot;!(loc.BiztalkApplicationName)&quot;" />
  <CustomAction Id="RunBtsRmvApp" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="deferred" Return="ignore" />


Thanks,
Kiran Challa
------------------------------------------------------------------------
------
_______________________________________________
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

Reply via email to