Re: Tough question - get your thinking caps on
- From: Harry Johnston <harry@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 26 Mar 2007 14:17:30 +1200
NW_DE wrote:
I need to remotely edit the HKCU\Software\Policies\Microsoft key, in order to add the Security subkey and the CheckAdminSettings dword value required for use with Outlook Security Templates.
Unfortunately, this is a "restricted" key, and only the Administrators have full access.
Hmmm. Depends a lot on context - the user's hive won't be loaded unless the user is logged in, but you need to use administrator privilege to make the change. Based on what you've said I suspect this isn't a problem in your circumstances.
Assuming that you are already able to run code as administrator while the user is logged in, all you should need to do is access the key in question via HKEY_USERS instead of via HKEY_CURRENT_USER. The latter won't work because the process isn't running in the user account you want to manipulate.
HKEY_CURRENT_USER is a shortcut to HKEY_USER\{sid} where {sid} is the SID of the user account. I'm not sure offhand of the best way of finding that out (again, it depends on the context) but failing all else you could enumerate the subkeys of HKEY_USER and look in Software\Microsoft\Windows\CurrentVersion\Explorer for the "Logon User Name" value.
Harry.
.
- Follow-Ups:
- Re: Tough question - get your thinking caps on
- From: Doug Knox - [MS-MVP]
- Re: Tough question - get your thinking caps on
- Prev by Date: Re: Disable share GUI while keeping File and printer sharing
- Next by Date: Re: Tough question - get your thinking caps on
- Previous by thread: Re: How to do if user always claim network is slow
- Next by thread: Re: Tough question - get your thinking caps on
- Index(es):