Thursday, July 07, 2005

Registry Editing

I am continuing to work on Internet URL Zones, and hand editing the registry. Since I run as non-admin I don't have the rights to run regedit, but running as admin means the HKCU is not the user I want to edit.

To do this I used to find the correct user SID by browsing for the user name, where it shows up as the data under:

HKEY_USERS\\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon User Name

Then if you look a little bit further down under 'Explorer\Shell Folders' you will find the profile folder path for that user under a lot of valua-data pairs.

But some time ago I came upon a tip from Doug Knox at his site. I forgot the details and had to go back to his site , so it is clearly a candidate to post here: Editing the Registry for "other" Users.

His idea is, when running as admin, browse to the user profile folder of the target user. He says it is under the \Document and Settings\ folder, which is usually correct, but not always (read my note below). Then find NTUSER.DAT under the target user. Load it into Regedit by using the File-LoadHive menu choice (which is only enabled if you have the HKLM or HKCU tree selected in regedit). You need to supply a temporary name when loading. Make your edits, then unload, saving it.

In the end, I am not sure that this is easier in my case, because I often move the profile files, or change usernames, etc, for security reasons. Currently I have an anomaly whereby on this machine such that even though I am running as non-admin, and my logon username shows up under the key above, my profile is stored under \Docs&Settings\admin\ ! So clearly just browsing as he suggests could lead to a problem


Post a Comment

<< Home