Chage registry value for any users.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to everybody, i have this question to post:
I build a script vbs that run any time any user logon on system, this script
must change value settings Internet Explorer for any user, but any time user
logon the script raise error of problem authorization to create keys.
the script is this:

Dim objShell, RegLocate, RegLocate1
Set objShell = WScript.CreateObject("WScript.Shell")
RegLocate = "HKEY_USERS\.DEFAULT\Software\Policies\Microsoft\Internet
Explorer\Restrictions\NoBrowserOptions"
objShell.RegWrite RegLocate,"1","REG_DWORD"
WScript.Quit

Some one know how can solve this problems.
Thanks a lot.
 
Unfortunately you can't unless the script is run under an account with system
or administrative priveleges.

Furtheraaaaaaaamore, as you've realised, assigning as value to the .default
profile is of little use except on a brand-new computer, since it doesn't
apply to existing users.

Possible workarounds:

Apply policies.

Arrange for the script to run when a user logs-on, so it runs in their
context. This could be via a logon-script, or by a startup shortcut.

Run the script with RunAs.
 
It doesn't apply to any user (this is .default not Default User). This is the setting when noone is logged in. It would only need to be set once and is pointless as a logon script.
 
Alex,

For new user profiles?

How to create a custom default user profile:
http://support.microsoft.com/?kbid=319974

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Hi to everybody, i have this question to post:
I build a script vbs that run any time any user logon on system, this script
must change value settings Internet Explorer for any user, but any time user
logon the script raise error of problem authorization to create keys.
the script is this:

Dim objShell, RegLocate, RegLocate1
Set objShell = WScript.CreateObject("WScript.Shell")
RegLocate = "HKEY_USERS\.DEFAULT\Software\Policies\Microsoft\Internet
Explorer\Restrictions\NoBrowserOptions"
objShell.RegWrite RegLocate,"1","REG_DWORD"
WScript.Quit

Some one know how can solve this problems.
Thanks a lot.
 
Back
Top