Jump to content

Uninstall app as Admin fails to remove registry keys for User


Shadowpp

Recommended Posts

Not sure if this is the rigth forums for this but here goes....

My scenario:

- I install an app as Admin that contains registry keys to be written in the HKCU key.

- Then I run the app as User which causes the app to self-repair to write the HKCU registry data for User

- I then uninstall the app as Admin

The problem is that the HKCU entries for User remain upon uninstall of the app.

How can I ensure all HKCU registry entries for User are removed when Admin uninstalls the app?

From my research it seems that I should be able to accomplish this with either the RemoveRegistry or Registry tables by specifiying the full path to the keys I need to delete. However as the uninstall is running as Admin it seems I would need to specify the removal of the User keys from HKEY_USERS but how I would not know the correct path for the key?

Thanks in advance.

Link to comment
Share on other sites


From my research it seems that I should be able to accomplish this with either the RemoveRegistry or Registry tables by specifiying the full path to the keys I need to delete. However as the uninstall is running as Admin it seems I would need to specify the removal of the User keys from HKEY_USERS but how I would not know the correct path for the key?

The problem with removing registry keys for another user when that user isn't doing the uninstall is that you don't necessarily have easy access to their registry (ntuser.dat). You could either write a script that loaded up everyone's ntuser.dat file, parsed the registry for the correct location to the reg keys you wanted to delete, and deleted them; or, you would have to parse all of the subkeys under HKEY_USERS to find the keys you are looking for. Note that neither approach is 100% foolproof, and that's why (in most cases) uninstallers only remove reg values from the HKCU hive for the user doing the uninstall, and everyone else's reg values (if they exist for the app) are untouched.

http://support.citrix.com/forums/thread.js...4&tstart=30

http://groups.google.com/group/microsoft.p...=raot&fwc=1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...