I need to make changes to the Windows built-in Guest account registry hive when the user is logged off. Does anyone know where it’s stored?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The registry hive for the guest account will normally be in
c:\users\guest\ntuser.dat, the same as any other account. (Note that in some cases the profile might have a different name, e.g., if there is a domain guest user and that profile was created first. Also, for Windows XP and earlier, the path isc:\documents and settings\guest\ntuser.dat.)You can load this hive into the registry using RegLoadKey and then manipulate it using the normal registry functions.
When you’re finished with it, use RegUnLoadKey. This will make sure all your changes are saved, although this will also happen automatically when the machine shuts down. It will also release the lock on the file so that the account can log in again.
(I’m not sure what will happen if someone tries to log in while you’ve manually loaded the user hive. I recommend you disable the account before loading the hive and re-enable it after unloading.)