You could use three custom actions:
A deferred action that makes a backup copy of the file and then modifies it 
(basically what you have now).
A rollback action that would replace the modified file with the backup copy.
A commit action that deletes the backup copy.

-- 
Stefan Krueger
Microsoft Windows Installer MVP

Please post your questions in the newsgroup or vist one of these web sites:

Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de

InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)
"Dana Gutride" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
Kalappa:

According to the MSDN MSI help: A rollback custom action must always precede 
the deferred custom action it rolls back in the action sequence. A rollback 
custom action should also handle the case where the deferred custom action 
is interrupted in the middle of execution.

You can do this in WiX by using the following sort of syntax:


<InstallExecuteSequence>
<Custom Action="appInstallRollback" After="InstallFiles">NOT Installed AND 
NOT REMOVE</Custom>
 <Custom Action="appInstall" After="appInstallRollback">NOT Installed AND 
NOT REMOVE</Custom>
</InstallExecuteSequence>

    <CustomAction Id="appInstall" FileKey="myapp" ExeCommand="/dosomething" 
Return="check" Execute="deferred"/>
    <CustomAction Id="appInstallRollback" FileKey="myapp" 
ExeCommand="/undosomething" Return="check" Execute="rollback"/>



On 6/28/06, Kalappa Pattar <[EMAIL PROTECTED]> wrote:
Hi All,

            In my installer, I call utility.exe through VB script.
This utility modifies the config file while installing and roll back the 
changes to config file while un-installing.

Now while installing say the event writing to the config file is over and 
user will cancel the setup after that event.
The changes done to the config file won't be rolled back.

So how and where to handle rolling back the action of some external exe if 
the user clicks cancel button after the external exe (which is called 
through VB script) has performed it's action?

Best Regards,
Kalappa Pattar
"In rivers, the water you touch is the last of what has passed and the first 
of that which comes, so with present time." - Leonardo Da Vinci


The information contained in, or attached to, this e-mail, contains 
confidential information and is intended solely for the use of the 
individual or entity to whom they are addressed and is subject to legal 
privilege. If you have received this e-mail in error you should notify the 
sender immediately by reply e-mail, delete the message from your system and 
notify your system manager. Please do not copy it for any purpose, or 
disclose its contents to any other person. The views or opinions presented 
in this e-mail are solely those of the author and do not necessarily 
represent those of the company. The recipient should check this e-mail and 
any attachments for the presence of viruses. The company accepts no 
liability for any damage caused, directly or indirectly, by any virus 
transmitted in this email.

www.aztecsoft.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








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

Reply via email to