Click to See Complete Forum and Search --> : Installer Uninstall doesn't remove Registry


lalaphil
April 25th, 2008, 07:35 AM
Hi,

I would like to remove a registry during the uninstallation. I have created this registry in the Registry section of the installer and put the property DeleteAtUninstall at True.

As it is the program itself which has created the Registry and not the installer, I guess that's why the uninstall doesn't remove this registry.

Is there a way to force the uninstall to delete this registry? The name and location of the key will be always the same

Thanks for your help,

Philippe

ahoodin
April 25th, 2008, 07:49 AM
Which Installer program was used to create the Installation programr? :D

lalaphil
April 25th, 2008, 10:39 AM
Hi,

Thanks for your reply.
The installer is the installer of visual studio which create msi file.
In this installer I create this registry but put the property AlwayCreate at false, so it doesn't create the key. It is the program that is installed that create the key.
I would like the installer/uninstaller to delete this key in the registry

Thanks for your help,

Philippe

ahoodin
April 25th, 2008, 10:45 AM
Use RegDeleteKeyEx() in your uninstall.

http://msdn2.microsoft.com/en-us/library/ms724847(VS.85).aspx

lalaphil
April 25th, 2008, 10:56 AM
Hi ahoodin,

Thanks again for your answer :)

I'm not used to the uninstaller, where do I have to put this code? Is it a custom action?

Sorry I'm new with the use of the installer
Thanks a lot,

Philippe

lalaphil
April 25th, 2008, 10:57 AM
I'm using C# by the way

ahoodin
April 25th, 2008, 11:48 AM
http://www.c-sharpcorner.com/UploadFile/mahesh/WorkingwithWindowsRegistry11282005045112AM/WorkingwithWindowsRegistry.aspx

Well if you still want to use the installshield to do it, perhaps you should look at the first link.

InstallShield for vc++ 6.0 doesn't really do C#.

The Installer generates a C like Script, and it uses some commands very similar to Windows API that infact probably wrap or call the actual API calls themselves. You will have to run the Project Wizard in the InstallShield Application to help you learn how it works. If you care to use the InstallShield.

lalaphil
April 25th, 2008, 11:51 AM
Thanks again,

But how do you implement it in visual studio installer?

Thanks,
Philippe

ahoodin
April 25th, 2008, 11:55 AM
If it is in the newer one, well which it looks like it is, there is no script, there should be a way to configure it

Here is the way:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=817758&SiteID=1

lalaphil
April 25th, 2008, 12:16 PM
Thanks,

I have to override the uninstall function of the installer so.
I'm trying to see now how it works :(

I have to create a class but where? and how to connect it to the installer?


Thanks a lot for your help,

Philippe

lalaphil
April 25th, 2008, 12:18 PM
I think I've got something there:

http://www.dotnet247.com/247reference/msgs/17/88848.aspx

lalaphil
April 25th, 2008, 12:27 PM
Not very clear though :(