Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2012-03-29
11
1,284 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 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