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


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


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?
Answered 05/29/2009 by: aido
Yellow Belt

Please log in to comment
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.
Answered 05/30/2009 by: AngelD
Red Belt

Please log in to comment
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.

Answered 05/31/2009 by: India_Repackaging
Blue Belt

Please log in to comment

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 :)
Answered 06/01/2009 by: aido
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity