Backup/Restore files on Install/Uninstall

21 views
Skip to first unread message

Vishnulal B.

unread,
Apr 20, 2015, 6:00:22 AM4/20/15
to msi...@googlegroups.com
Hi Guys,

I am trying to create an Installer package which will update some files of an existing product in the target machine.
Basically I want to ship the updated dlls, config files etc. for an existing product. I want to achieve the following things.

On installation:

1) Backup all the files ( already installed on the machine) which is going to be updated by my installer before the installation ( before InstallFiles action ).
2) Install my installer.

On uninstallation:

1) Uninstall my installer.
2) Restore all the files backed up in step 1 on installation ( after RemoveFiles action ).

So after uninstalling my product, basically system goes back to the previous state ( the state before the installation of my product ).

I'm not much inexperienced with Custom Actions. How can I achieve this task using msiext Custom Actions. 
Is there any existing examples which illustrates my requirement for a reference.

Daniel Doubrovkine

unread,
Apr 20, 2015, 7:01:33 AM4/20/15
to msi...@googlegroups.com
You should be able to do this declaratively with the SystemTools extension, http://dblock.github.io/msiext/docs/1.2/namespace_wix_1_1_extensions_1_1_system_tools.html.

There're examples in https://github.com/dblock/msiext/blob/master/src/Demos/SystemToolsMsi/SystemToolsMsi.wxs#L39, you'll need a single CopyFiles on install and CopyFiles on uninstall. It will be important to worry about rollback and other failure scenarios, but you can cross that bridge later.

--
You received this message because you are subscribed to the Google Groups "msiext" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msiext+un...@googlegroups.com.
To post to this group, send email to msi...@googlegroups.com.
Visit this group at http://groups.google.com/group/msiext.
For more options, visit https://groups.google.com/d/optout.



--

Vishnulal B.

unread,
Apr 21, 2015, 1:25:30 AM4/21/15
to msi...@googlegroups.com
Hi Daniel,

Thanks a lot for your reply. I'll try to do it accordingly.
Reply all
Reply to author
Forward
0 new messages