jrsoftware.org // Jordan Russell's Software
-Home

Products

-Inno Setup


-Toolbar2000

-Toolbar97

-StripReloc

-More...

Support

-Newsgroups

-Contact Me

#######
visitors since
Jan. 1998

Inno Setup Knowledge Base
Return to index

FAQ: Is it possible to delete keys inside every users' HKEY_CURRENT_USER registry hive?

Article Created: 2004-04-10 05:04 GMT by Jordan Russell
Last Updated: 2004-04-10 05:36 GMT by Jordan Russell


No. There is no foolproof method of accessing registry keys belonging to other users.

In order to access a given user's registry hive the user's profile must first be loaded, and in order to do that, authentication is necessary. An uninstaller would not know the user's password.

"But couldn't it call RegLoadKey to manually mount the user's registry hive (NTUSER.DAT)?" Without impersonating the user, the user running the uninstaller would need write permission on the user's profile directory. On Windows XP, user profiles can be marked "private", where no one but the user himself can access the files inside it.

And in a roaming profile setup, it's impossible to even know the path in which a given user's profile resides without authenticating first.

So how do other installers deal with this situation?

They don't. They simply leave the HKCU keys of other users in place.


Site contents Copyright © 1997-2012 Jordan Russell. All rights reserved.