Remove previous installed entry from Add/Remove Programs for non admin user

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Remove previous installed entry from Add/Remove Programs for non admin user

george@wix
This post has NOT been accepted by the mailing list yet.
Hello,

All my installers are for non admin users and I need SKIP the UNINSTALL.

For my case, I have to build a installer to be able to skip the uninstall (easy to do), if I do that, I found out if a user installs two versions, two entries will show up in Add/Remove Programs list. So I would Skip the uninstall and remove the previous Add/Remove Programs entry (I know exact entry since I have the build script.)

The issue I face is the end user is non admin user, and the Add/Remove entry are in HKLM\Software\..., the user has no access and got an error.

On the other side, if I build a normal installer which will perform uninstall-then-install workflow, the previous entry in HKLM\Software\... will be removed, and a new entry will be added to HKLM\Software\..., It is still the same non-admin user, but be able to add/remove entry to HKLM section.

My question is: why non-admin user could add/remove entry to HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{guid} when installing software, but if I use RemoveRegistryKey directly against HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{guid}, it always fail. Why?

Thanks for the help!

George
Loading...