Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Push out registry change 1

Status
Not open for further replies.

lengoo

IS-IT--Management
Jan 15, 2002
381
GH
Hi Guys
Does anyone know how to push out a registry change using the GPO or login scripts?
I don't have any software rollout packages such as SMS nor do the users have local admin access to their local machines so I can't just simply get them to run the .reg file?
Is there a way where I can run the registry file as the local admin without them seeing when they login via login script?
Thanks
 
Package the script to make the registry change into an .msi file. Then assign this .msi file to the computer through GPO. It will install on next startup, before the user can login and also run with elevated rights.
 
Thanks WallSt
I tried this before and couldn't get it to work. I know that applications are only installed if using MSI packages if the associated file for the application is run for it.. eg when you build a MSI file for Winzip, Winzip is only installed when you try and run a .zip file.
How can I get the MSI to run and not wait for any extension to open? Hope I've made sense :)
Lengoo
 
I use Kixtart scripts for this, but you could use VBS. You only need to use GPO to give them access to the keys that need to be changed. There's also a tool running around that let's a loggin script run with admin priv's, in order to allow changes like this. I've never used it though.

If you didn't want to "script" it so to speak, you could jst merge t .reg file using a bat file and regedit /s.
 
What registry changes are you looking to make? I can help with a script if you post what you need.

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
lengoo - You need to assign the package to the computer though GPO. The results you are getting are from assigning to a user.
 
Hi guys

The registry file I have is very simple.. it is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"SearchList"="uk_office.com,usa_office.com"

 

Code:
on error resume next

Dim path

Set WSHShell = Wscript.CreateObject("WScript.Shell")

'set the key path here.  IF you don't end with a '\' then WSH assumes you are pathing to a value. 
path = "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\"

'this fills the sub key with the value and specifies that it is a regular string 

WSHShell.RegWrite path & "SearchList","uk_office.com,usa_office.com","REG_SZ"

If err then
	msgbox "Error Encountered"
else
	msgbox "Registry Edit Successful"
End if

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Lengoo

The way I push out Registry Keys is to modify the login script used with in GPO. Create a .reg file with the key you want to add/modify then place it in a share on a server/pc where everyone has access, then edit your login scipt as follows

:abcdef
if exist c:\regkey.txt then goto 123456
regedit /s \\<servername>\<sharename>\test.reg
echo reg key added >c:\regkey.txt

On login then all users to whom the GPO applies to will run the usual login script but the script will also check for the regkey.txt on your hard drive, if not present then the test.reg key will be added and regkey.txt will be created, thus the subsequent times they login the script can see that regkey.txt is present and move on to the 123456 (or whatever) part of the login script...

Hope this makes sense, and it works for me everytime.

thanks

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top