Re: Tough question - get your thinking caps on



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_USERS will only show the user hives that are currently loaded/logged on. And since they're in use, they're locked and unavailable to the Load Hive function of Regedit, or the Windows API's.

--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Harry Johnston" <harry@xxxxxxxxxxxxxxxxxx> wrote in message news:OHT0pz0bHHA.2188@xxxxxxxxxxxxxxxxxxxxxxx
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.

.



Relevant Pages

  • duplicate administrator account created - cant get into old one
    ... the same SID I had), xp seems to have created a duplicate ... but in the documents and settings folder, i see the old username ... 'administrator' user account, and not the 'administrator.computername' ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Tough question - get your thinking caps on
    ... add the Security subkey and the CheckAdminSettings dword value required for use with Outlook Security Templates. ... 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. ... HKEY_CURRENT_USER is a shortcut to HKEY_USER\{sid} where is the SID of the user account. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: I CANT ACCESS MY FILES
    ... > Since I left the company and my user account was deleted, that SID is gone. ... > I spoke to one of the Administrator to recreated my account and to let me ...
    (microsoft.public.win2000.registry)
  • Re: I got a virus help
    ... Most Windows users will tell you that this is akin to the "Administrator" account on your PC, but that is not exactly the case. ... Microsoft has attempted to emulate this technique many times, but always fails miserably in its implementation. ... But wait, you say, doesn't Mac OS have that same problem? ... So if you happen to exploit one of them, you can only do what that small, very restricted user account can do... ...
    (rec.music.makers.guitar.acoustic)
  • Re: in trouble
    ... administrator and I can only see log in as a owner. ... Method 1 - If you have a Vista installation DVD you can ... CompAdmin and create a new Standard user account for your daily work. ... operating system structure. ...
    (microsoft.public.windows.vista.security)