<Custom Action Id ="UndoActionA" Before ="RemoveFiles"/> I think this works might have a syntax error though
Dhaval Patel-4 wrote: > > Yet another minor query for all you WIX pros out there. I just realized > that > running the batch command after uninstall in my case fails because by the > time I reach the "batch-file" functionality, the actual batch file has > already been uninstalled by WIX. Is there a way (I am sure there is) that > I > can execute the Custom Action to run the batch file right before the > execution of the uninstallation procedure begins? To be specific, a user > selects "Remove" and the first thing that happens is the batch file gets > executed before anything else. > > Thanks, guys! > > > On 2/5/07, Dhaval Patel <[EMAIL PROTECTED]> wrote: >> >> Thanks so much for the replies, guys! Great help!! By the way, Levi was >> correct to assume that I want to run the batch file only on uninstall :). >> >> Thanks again, both of you! >> >> >> On 2/5/07, Levi Wilson <[EMAIL PROTECTED]> wrote: >> > >> > The condition: >> > >> > Installed AND NOT REINSTALL >> > >> > Would only execute on an Uninstall. >> > >> > On 2/5/07, fiordean dacian < [EMAIL PROTECTED]> wrote: >> > > >> > > 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<http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0A>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 >> > > > >> > > > >> > > >> > > >> > > ------------------------------ >> > > Need a quick answer? Get one in minutes from people who know. Ask >> your >> > > question on Yahoo! Answers >> > > >> <http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx> >> > > . >> > > >> > > >> > > >> ------------------------------------------------------------------------- >> > > 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 >> > > >> > > >> > >> > >> > >> ------------------------------------------------------------------------- >> > 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 >> > >> > >> > >> > > ------------------------------------------------------------------------- > 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 > > -- View this message in context: http://www.nabble.com/CustomAction-tf3162593.html#a8933030 Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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