views:

489

answers:

4

I have created a setup and deployment project in Visual Studio 2008 Professional. I'm using Visual C++, and in it I have two exe files which run under custom actions. One is running in commit and other in uninstall. Purpose is to add a registry key at install time and remove it at uninstall. It works perfectly on Windows XP but when I change to Windows 7 and run the setup, only the key-adding part works. The key doesn't get deleted at uninstall. But when I take the uninstall exe file out from the setup and run it separately on Windows 7, (not through the setup, by just double-clicking on the exe) it removes the registry entry perfectly. Any idea what the problem is?

A: 

What prevent you from checking error code returned by RegDeleteKey? I suppose your problem is releated to access rights which are different while launching your program in various contexts. Probably you try ro remove key from HKLM. Check manifests of your custom program and uninstaller.

VitalyVal
Thanks so much, I'll look in to it :)
Isuru
A: 

I'm having this problem too, but under Vista. Adding registry keys works fine, but they do not get deleted upon uninstall. I'm trying to delete from HKEY_CURRENT_USER/Software/Mysoftware. I have not tested with XP or 7 yet.

Jen
A: 

hi, i don't know how to resolve your problema, but i need to know how you make with the registry keys on win7. I'm asking, because i need to install an application on a win7 of 64bits, but when try to creat a key on HKLM\Software.. give me an error mesage:"Requested regestry access is not allowed". I've already see on other pc with win7 that I can install, and figured out that the problem is because of permissions. The both users are Administrators. If i remove the level security od user i can install my application.

Do you any idea how can i resolve this?

caty
A: 

Hi, again. I solved my problem, creating a .reg file, so with this .reg file, i made with vb, a process.start() and then i deleted de .reg file from hard disk. With this way, i can create keys on users that don't have a full access to his permissions on regedit.

About uninstall, i'll make a new research..thanks any way

caty
And also if you use the setup and deployment registry editor on Visual Studio, you can create keys without problems, even in Win 7. Sorry for not posting early!
Isuru