Link to home
Start Free TrialLog in
Avatar of asasupport
asasupportFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Deploying reg file through group policy

Hi,

I've been trying to deploy a reg file through group policy over the past few days but without any joy.  I've never had to do this before so any help would be much appreciated!  

I've followed the instructions on the below link.  However, I applied this under the Computer Configuration Node (rather than users), Policies, Windows Settings, Scripts (Startup/Shutdown).

http://blogs.technet.com/b/askds/archive/2007/08/14/deploying-custom-registry-changes-through-group-policy.aspx

In the Startup, I have put in the following:

User generated image

The registry key is below.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_PROTOCOL_LOCKDOWN]
"explorer.exe"=dword:00000001
"iexplore.exe"=dword:00000001
"*"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\RestrictedProtocols]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\RestrictedProtocols\1]
"mhtml"="mhtml"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\RestrictedProtocols\2]
"mhtml"="mhtml"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\RestrictedProtocols\3]
"mhtml"="mhtml"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\RestrictedProtocols\4]
"mhtml"="mhtml"


I have also dropped the file into the Show Files location.

In the group policy I have Security Filtering enabled.  We have created computer security groups which have been assigned to the policy.  Authenticated users are also in the Security Filtering.

When I run the Group Policy Modeling Wizard this shows that the GPO is being applied.

Also, when we start up the clients PCs, Resultant Set of Policy is showing the policy as being applied.  However, when I got to regedit, it has not made the changes.

We are running Windows 7 PCs and Server 2008 domain controllers.

Am I missing something really simple?





ASKER CERTIFIED SOLUTION
Avatar of Krzysztof Pytko
Krzysztof Pytko
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are going to do it the way you are going it, I usually create a .cmd file and put the full command in that. I think that you would otherwise need to put regedit into the directory with the script.  I think that it's better to go with Krzysztof's suggestion, but it is more work to implement.

regedit /s \\domain.local\sysvol\.....\machine\startup\file.reg

Open in new window

I think you're blocked by UAC on Windows7 and 2008.
When you run regedit /s on Windows7 computer, without command prompt with elevated privilege, UAC ask you if you want to bring modifications to registry.
I think you have two choices:
- use a batch file to launch regedit /s \\server\share\file.reg
- use commands REG to modify registry (like this: reg add HKCU\software /v test /t REG_DWORD /d 00000002), either directly or in a batch file.
Using Regedit i have the UAC prompt, with Reg commands i haven't it.
You could too disable UAC for all users, but is it really secure?
Do you prefer to do this with custom ADM template
http://www.frickelsoft.net/blog/?p=62
Avatar of asasupport

ASKER

Thanks Krzysztof!!  I've managed to crack it!!

I did use the Group Policy Preferences.  Went into Computer Configuration>Preferences>Windows Settings>Registry>Right click>New>Registry Wizard

I saved the reg file I needed to deploy to a 32-bit client PC and then drilled down to the file location.

The key then appears in the group policy.

 User generated image
Drill down to the key location.  Right click on each entry, Properties, and Replace.

 User generated image
Once again excellent advice from Experts Exchange!

Regards,

Y
I'm glad I could help :) You're welcome :)

Krzysztof
Many thanks Krzysztof!!  Using the Group Policy Preferences did the trick.  Being a numpty, I used the Registry Wizard.

Many thanks!!

Y