/build/static/layout/Breadcrumb_cap_w.png

MSI Intelligence - Backup Data, Uninstall Another MSI if Present, etc.

I have a bit of a weird and wonderful bespoke application which we've packaged as an MSI. I'm looking for some advice on the best approach for the following.

What I'd like the latest MSI to do is:

Check whether a previous versions of the application (MSI) has been installed. If so then do the following:

1) Backup up key elements of the program, unfortunately user/program data is stored in with program, in [INSTALLDIR]. A 'Backup' subdirectory would be created and then certain files would be copied to that subdirectory.

2) Uninstall all the previous version of the application.

3) Continue with the install of the new install.

A patch/upgrade approach isn't really suitable as the original MSI (2 versions) has a number of issues, so we'd like to start clean, i.e. remove it completely. The options I'd been playing with were a) a script (WiseScript or VBS) which would search for the product codes of the two previous products and if they existed run a file backup routine and then kick off a Windows Installer uninstall of the product it had detected.
The other option was to use System Search to check for the key EXE. The results of that, i.e. the property value would determine what a Custom Action would do; i.e. Nothing or the Backup and Uninstall.

If there's a better approach then I'd welcome the advice.

Thanks

0 Comments   [ + ] Show comments

Answers (1)

Posted by: anonymous_9363 13 years ago
Red Belt
0
- Your scripted back-up idea is sound.

- Use VBS. WiseScript is tortuous at best and examples of good, robust code are hard (read: impossible) to find. Maintenance will also likely be an issue if the original coder gets knocked down by a bus, whereas most decent packagers - and many support staff - know VBS.

- You won't be able to execute an MSI inside another MSI. My choice - given that you want to just get rid totally - would be to use the RemoveFile and RemoveRegistry tables. These are well documented on MSDN and, of course, help is at hand here. Remember, though, to include the WI installation data in the registry.

Good luck!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ