PDA

View Full Version : Uninstall: how to remove files but not registry settings?



philbond
06-09-2005, 12:14 AM
Hi all,

In my installation, I put down some registry settings with a Component. When the product is Uninstalled the Component's file & registry settings are removed.

Here's the problem: I want the file to be removed, but I don't want the registry settings to be removed.

I've tried creating a Component that doesn't contain a file, which just puts down the registry settings and I marked this Component as permanent. Sadly, if you Publish the MSI via Active Directory with the user fully locked-down (but with Elevated Privileges, of course), the registry settings don't get written so this approach is no good for me.

I also can't use IS Scripting as this also causes problems when the MSI is Published via A/D.

Does anyone know of a way to achieving this?

Thanks in advance...

- Phil

jain.rajat
06-09-2005, 12:23 AM
Hi!

I think the best way would be to write a script or a function in the installer dll. You can then write the registry value from there. Sequence that in a custom action.

Whatever registry values you create from here would not be deleted by the installer on deletion.

regards,
Rajat Jain

Bill_Thompson
03-23-2007, 04:57 PM
I have a simular problem. My uninstall is not working at all. It is not removing the product from the hard drive.

Alfetta159
04-05-2007, 01:59 PM
You could try putting the registry settings into a permanent component and the file settings into a non-permanent, non-shared component.

(WAGD: Wild *** Guess Disclaimer: I haven't done this myself, just a suggestion. But I have done this with similar files that come from a common source. When one has to be permanent, he gets put into a permanent component while the rest are in another component.)

SGorman
04-06-2007, 12:03 PM
You could try putting the registry settings into a permanent component and the file settings into a non-permanent, non-shared component.

(WAGD: Wild *** Guess Disclaimer: I haven't done this myself, just a suggestion. But I have done this with similar files that come from a common source. When one has to be permanent, he gets put into a permanent component while the rest are in another component.)

I have done this and it does work.
Create a separate component just for the registry settings and mark that component as Permanent. It will not remove the reg settings on uninstall.

SGorman
04-06-2007, 12:04 PM
I have a simular problem. My uninstall is not working at all. It is not removing the product from the hard drive.

Check and make sure that all your components are not marked as Permanent or Shared.

nc4ted
01-31-2008, 08:20 PM
I know this post is 10 months old, but I'm having the same problem.

Believe me, I've scoured forums and websites, and one of the best solutions is responding to a 10-month old post. Yikes.

All of my components are NOT Shared nor Permanent, however none of the files are uninstalling. What's going on here?!? Any help would be greatly appreciated.