Solved

Deploy registry package to users via group policy - Server 2008 R2 domain

Posted on 2012-03-29
11
1,272 Views
Last Modified: 2012-06-22
I know how to create and deploy 1 registry key, value etc to users with GPO, but in this case I wish to deploy about 50 relating to 1 peice of software that needs to be standardised.

I have exported the relevant reg settings from 1 PC and the plan is publish it to a group of users with GPO.

Is this possible to deploy a reg package, or do I need to manually create every key value that I want to deploy?
0
Comment
Question by:Mayogroup
11 Comments
 
LVL 21

Expert Comment

by:motnahp00
ID: 37785370
I do most of my registry changes manually through GPO.

Computer Configuration -> Preferences -> Windows Settings -> Registry

I prefer this method because I can update the reg value versus doing a hard replace.
0
 

Author Comment

by:Mayogroup
ID: 37785386
So with this method I have to manually enter every single reg key/value setting.
This will take me a whole day.

There is no way I can just upload the reg key that I exported?
0
 
LVL 21

Expert Comment

by:motnahp00
ID: 37785405
How about a computer startup script to run a batch file?

Computer Configuration -> Policies -> Windows Settings -> Scripts (Startup/Shutdown)
0
 

Author Comment

by:Mayogroup
ID: 37785517
understood.
So assuming I saved the key as "example.reg", what triggers would I need to include in the batch file to auto-answer the "do you want to update registry" etc?
0
 

Author Comment

by:Mayogroup
ID: 37858965
Hello, does anyone have any further comments to add?
0
 
LVL 11

Accepted Solution

by:
tmeunier earned 500 total points
ID: 37906122
Sounds like you need this blog post, which discusses converting the .reg file to a .admx policy template, that you can just throw at a GPO.  With examples:
http://mscosentino-en.blogspot.com/2010/02/convert-registry-file-to-admx-policy.html

-tom
0
 
LVL 23

Expert Comment

by:Admin3k
ID: 37906381
if I understand your question properly
you can import it silently through reg import command
Type Reg import /? in CMD window
if the key does not exist , you can use reg add command, then specify the values and Data types in your command
type reg add /? in CMD window
you can also try the command  Regedit /S file.reg
a sample script should be like

@echo off
regedit /S file.reg
exit

once this is set as a logon scrtipt ,created a GPO as per above links domain machine will run it ,just make sure that you save the REG file you wish to distribute in the same place as your script
usually SYSVOL Directory on your Domain Controller
0
 
LVL 32

Expert Comment

by:Robberbaron (robr)
ID: 37906842
For registry settings that access other than current user, like registering a DLL for example,
you need to use the Windows Startup script option so that the batch file runs as a system user.

Drawback of this is that the script and all files needed must be available to the computer before logon is complete. So I end up putting the files with the NETLOGON or SYSVOL share.

attached is a VBS script i still use to force out a DLL. when run from GPO, they run using CSCRIPT fso no interaction.
(note that i use Regsvr32 because im puching out a dll, Admin3k has shown how to use regedit. just make sure that you give the full path to the reg file)
'--- set up files & log ---------
const ScrFldr="\\DOMAINNAME\NETLOGON\scripts\"       'std source location

	dim a, src , sVers
	dim fs
	src="dsofile.dll"

	Set fso = CreateObject("Scripting.FileSystemObject")  
	sysfld = fso.GetSpecialFolder(1)    'the system folder
	winfld =  fso.GetSpecialFolder(0)   'the windows folder

'----copy dsofile if not exist --------------
  sVers="--"
	If (fso.FileExists(winfld & "\" & src )) Then
    		msg = "dsofile exists."
		sVers = fso.GetFileVersion(winfld & "\" & src )
		msg = msg & " v=" & sVers
	end if
	'msgbox ("vers" & msg)
	
	if left(sVers,6) = "2.1.28" then    
		'no action needed      should be 2.1.2841
	Else
		set f1 = fso.GetFile( scrfldr & src )
		f1.Copy winfld & "\" & src,True
		a=(sysfld & "\regsvr32.exe /S " & winfld & "\" & src )

		CreateObject("Wscript.Shell").Run a
		msg = msg & " Install dsofile "
		'msgbox("dsofile done")
	
	End If

Open in new window

0
 

Author Closing Comment

by:Mayogroup
ID: 38020504
This worked perfect. Thanks for the assistance.
0

Join & Write a Comment

Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now