Oleg767
13th March 2003 12:33 UTC
Remove registry key from HKEY_CURRENT_USER for ALL users
Hello.
Here's the question:
How can I remove some specific registry key located in HKEY_CURRENT_USER from ALL user accounts on this machine?
(This key is created by application in run time and contains some user-specific settings for each user).
Any help or hint are greatly appretiated.
damien74
13th March 2003 13:02 UTC
Not sure how you mean, but usually you just rightklick the key and choose delete.
viper0179
13th March 2003 16:10 UTC
You're not able to remove keys while under different user accounts. If you're wanting to store global registry keys use the HKEY_LOCAL_MACHINE (HKLM) key for your values instead of HKEY_CURRENT_USER (HKCU). Since you're using the HKCU key to store the different user settings, you may want to place them in the HKLM with a subkey of the username. That would be a viable alternative.
kichik
13th March 2003 16:15 UTC
That won't be a good idea as not all users are able to write to HKLM. Unfortunately, I don't have a solution to the original problem. I have tried searching Google for it but all I could find is "you can't do it" :(
viper0179
13th March 2003 18:49 UTC
I guess the only alternative would be to create an INI file and store the information in there.
0mar
13th March 2003 22:15 UTC
I'm not sure that this will help you, but I know for a fact that it won't hurt. :D
Please look at the script IGx89 posted in this thread. Hopefully it will help you achieve what you're after.