View Full Version : Scripting Registry changes


dinger
02-26-2004, 06:54 PM
I need to write a logon script which will change a
registry entry. The problem I am facing is regarding
access rights. Not all users have administrative access
to their respective computers. So when they logon as
themselves, they cannot edit the registry.
Does anyone have any idea how I could accomplish this
change?
Any help would be greatly appreciated.

Torgeir Bakken (MVP)
02-26-2004, 11:04 PM
dinger wrote:

> I need to write a logon script which will change a
> registry entry. The problem I am facing is regarding
> access rights. Not all users have administrative access
> to their respective computers. So when they logon as
> themselves, they cannot edit the registry.
> Does anyone have any idea how I could accomplish this
> change?

Hi

If you only need to set HKEY_LOCAL_MACHINE registry values,
and you are running Active Directory, you can do the changes
in a computer startup script (with a GPO) that runs as part
of the boot up process (before the user logs in). It runs under
the system context and has admin rights.


If you need to do this in a user logon script, here are some Runas
wrapper utilities or alternatives that might help you:

http://groups.google.com/groups?selm=3FE0B42C.773CA875%40hydro.com


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter