Hi,

I think Dhaval only wants its "UndoActionA" executed on removal, and not during 
the installation (otherwise it will immediately undo the effects of "ActionA", 
right?)

Recap: "ActionA" on install (and removal eventually)
            "UndoActionA" on uninstall only

There is indeed a restriction on REMOVE property, your custom action needs to 
be scheduled after "InstallValidate":
http://msdn2.microsoft.com/en-us/library/aa368013.aspx

Dacian


----- Original Message ----
From: Levi Wilson <[EMAIL PROTECTED]>
To: fiordean dacian <[EMAIL PROTECTED]>
Cc: WiX-users@lists.sourceforge.net
Sent: Monday, February 5, 2007 3:40:39 PM
Subject: Re: [WiX-users] CustomAction

If you did it that way I think that ActionA would run both on Install AND 
Uninstall.  To get ActionA to run Only in install, you would condition it like 
this:

<Custom Action="ActionA" After="InstallFiles">NOT Installed</Custom> <!-- Only 
run on Install -->

<Custom Action="UndoActionA" After="RemoveFiles">Installed AND NOT 
REINSTALL</Custom> <!-- Only run on uninstallation -->

Please correct me if I'm wrong.  I think that I read somewhere in one of the 
WiX (or MSI?) newsgroups that you shouldn't use the REMOVE property to 
condition something for uninstallation.  Hope this helps.


On 2/5/07, fiordean dacian <
[EMAIL PROTECTED]> wrote:


Hi Dhaval,

I'm new here and I have not much experience with WiX, but if my understanding 
is correct, here it goes:

...

<CustomAction Id="ActionA" .../>
<CustomAction Id="UndoActionA" .../>

<InstallExecuteSequence>

    <Custom Action="ActionA" After="InstallFiles"/>

    <Custom Action="UndoActionA" After="ActionA">REMOVE="ALL"</Custom>

    ....

</InstallExecuteSequence>

This will makes sure your 'UndoActionA' custom action is executed only during 
removal.


Hope this helps,
Dacian



-----
 Original Message ----
From: Dhaval Patel <[EMAIL PROTECTED]>
To: "

wix-users@lists.sourceforge.net" <wix-users@lists.sourceforge.net>
Sent: Friday, February 2, 2007 7:30:06 PM

Subject: [WiX-users] CustomAction

I have been trying to find a post that would sum up how to run a CustomAction 
(to run a batch file) at the end of an installation, and in the same MSI, 
another CustomAction that would run the corresponding "undo" action from 
another batch file. So the flow would be like:


Step 1) Install files
Step 2) Run batch file for action A
Step 3) Run batch file to undo action A
Step 4) Uninstall files

I have tried hard to find examples and it seems that running a batch file after 
install is straightforward, but what about the uninstallation phase? 
Specifically, what's the Event that I should tie the batch file to so that it 
runs only during uninstallation?


Thanks in advance, folks.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo


http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list


WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users









Finding fabulous fares is fun.


Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?

Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo


http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list


WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users











 
____________________________________________________________________________________
Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to