/build/static/layout/Breadcrumb_cap_w.png

How do you exclude files from being deleted during MSI removal?

Hi, I'm hoping one of you here can help me please.

Basically I'm new to app packaging and have been tasked with repackaging an app using an old Wise installer into MSI format.

I've done all that successfully, but a new requirement that's been raised has me stumped.

Basically the MSI installs the physical SQL2005 database files as well as all the program binaries, which I attach later via a custom VBScript.

When the package is uninstalled it acts as designed I guess and removes the database files from the volume, however, I've now been asked to make sure that these files are left behind when the package is uninstalled.

I'm looking at the MSI in Orca but can't see anywhere that would let me exclude files from being deleted during uninstallation? To be honest I can't really see anything about uninstallation in there.

Is there any way in a standard MSI to install a file but then leave it there if the package is ever uninstalled?

Thanks in advance for any tips or pointers on this one!

0 Comments   [ + ] Show comments

Answers (4)

Posted by: aido 14 years ago
Yellow Belt
0
Just noticed that MSI Package Builder for example has a permanence option which would do what I'm after - is there any way of doing this in a bogstandard MSI package or am I stuck without having something like that or another third party tool which I guess adds extra logic to the Installer?
Posted by: AngelD 14 years ago
Red Belt
0
You can do it in two different ways:
1. add the msidbComponentAttributesPermanent attribute bit to the component holding the resources (ex. files, registry...) you want to be left alone during uninstall.
2. remove the ComponentId column value in the Component table for the component you want resources to be left alone during uninstall.

I would recommend option 1, as for option 2 the component will not be recognized as installed meaning the component will not be repaired when one occur.
Make sure to only have these files one (or more) component as the components resources are handled as one.

If you're using wise then just select the details option while right-click on the component, then there should be a checkbox to prevent it from being deleted during uninstall.
Posted by: India_Repackaging 14 years ago
Blue Belt
0
Hi aido,

Just building on Kim's reply, I completely agree to the solution provided and would like to add just one thing. In case you using Orca for this task all you got to do is to change the value in the 'Attribute' column in Component table to 16 in case it has a file keypath or to 20 in case it has registry keypath.
You may read about this from the 'msi.chm' file which is shipped along with WPS.

Note: Make sure you change the attributes of only those components whose resources you want to leave behind on the system after uninstall.

Cheers
Posted by: aido 14 years ago
Yellow Belt
0
Hi,

Just wanted to say thank-you to both of you for that, I've got MSI45.chm loaded up now and can see the various bit options that I can set for the Attributes column in the Components table.

Thanks again for the help :)
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