Jump to content

Recommended Posts

Posted
Whats the best way to add a registry entry i.e. via a .reg file to computers on the network via a script? Must be simple to do but all the answers I seem to find onthe net seem to involve complex scripts. Sure I've done this before but age prevents me remembering howor where!
Posted
I'd set the GP startup script executable to %windir%\system32\reg.exe and the parameter as IMPORT regfilename.reg. Then just drop regfilename.reg into the group policy startup script files folder.
Posted

I do it like jsnetman for fixed registry entries.

 

I use this type syntax for variable ones

set WPKGROOT=\\server2\icttech\wpkg
set PACKAGES=\\server2\icttech\wpkg\packages
set WPKGBASEIP=10.81.63

c:\windows\system32\Reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v WPKGROOT /t REG_SZ /d "%WPKGROOT%" /f
c:\windows\system32\Reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PACKAGES /t REG_SZ /d "%PACKAGES%" /f
c:\windows\system32\Reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v WPKGBASEIP /t REG_SZ /d "%WPKGBASEIP%" /f

 

regards

 

Simon

  • Thanks 1
  • 2 months later...
Posted (edited)

This may be resurecting an old topic but just looking at that GPO setting mine has a lock symbol on it and prevents editing, how do I remiove the lock? I presume its in another GPO setting thats overriding the policy I want to change as if I run the reg entry manually it tells me I'm not allowed to edit the registry. Where in the policy would this be set so I can unset it?

 

 

Its OK, Think I've found it.

Edited by TechSupp

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...