Solved

Pushing Out Registry Settings at Startup

Posted on 2011-03-02
9
764 Views
Last Modified: 2012-06-21
I need to rollout the following registry update to all our client PCs.
I'm guessing the best way is via a GPO Startup script.
However, I've tried without success.
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Security]
"SecurityLevel"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\HHRestrictions]
"MaxAllowedZone"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000001

Open in new window

0
Comment
Question by:mikevr6
9 Comments
 
LVL 4

Expert Comment

by:jlar310
ID: 35019281
What have you tried without success? The file you attached is a registry export file, not a script.

Here is a sample of using vbscript to update registry values. The example sets the location of the Favorites folder to a UNC path on a file server.
Dim WSHShell, RegFavorites, RegValue
Dim server

' disable error messages
on error resume next

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

RegFavorites = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Favorites"
RegValue = "\\my\unc\path\UserData\%USERNAME%\Favorites"

WSHShell.RegWrite RegFavorites, RegValue,"REG_EXPAND_SZ"

WScript.Quit

Open in new window

0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 35019612
Run "regedit /s [filename]" in start script of the client PCs to write a .reg file to registry.

regedit /s YourRegFile.Reg

The /s will make the "are you sure" prompt go away.

Regedit Command Line Options Syntax
http://techsupt.winbatch.com/ts/T000001029F18.html

0
 
LVL 3

Expert Comment

by:thomasd04
ID: 35023467
Hi Mike. Have you tried doing it this way? What OS and clients do you have on the network?

1. Export this registry value to a file called nameyourfile.reg
2. Create a new Group Policy object and link it to the OU
3. Open it up and edit “User Configuration | Windows Settings | Scripts (Logon/Logoff).
4. Under the Logon node, we add our settings so that regedit.exe calls our nameyourfile.reg file silently (with the /s switch)
5. Click Show Files and drop our SciCalc.reg into SYSVOL

Good luck whichever way you do it.
0
 

Author Comment

by:mikevr6
ID: 35024985
Hi Thomas and Thommy. I hadn't tried the login script method. I was using a Computer Configuration\Startup Script.
First version did as Thommy said and popped up with a prompt. Then I tried to run with the regedit /s switch and it didn't work. I'll give your suggestions a try and post back. Thanks!
0
Wish Marketing would stop bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

 
LVL 4

Expert Comment

by:jlar310
ID: 35026020
As a startup script HKEY_CURRENT_USER has no meaning. The script needs to be run as the user in question. It must be a login script.
0
 

Author Comment

by:mikevr6
ID: 35026272
I'm not modifying the HKEY_Current_User keys those. These are all HKLM\Software settings. So computer settings.
0
 
LVL 3

Expert Comment

by:sam0x01
ID: 35045851
With only 3 values you could use REG.EXE to avoid needing to copy a .reg file for regedit /s

REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]

  KeyName  [\\Machine\]FullKey
           Machine  Name of remote machine - omitting defaults to the current
                    machine Only HKLM and HKU are available on remote machines
           FullKey  ROOTKEY\SubKey
           ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
           SubKey   The full name of a registry key under the selected ROOTKEY

  /v       The value name, under the selected Key, to add

  /ve      adds an empty value name <no name> for the key

  /t       RegKey data types
           [ REG_SZ    | REG_MULTI_SZ  | REG_DWORD_BIG_ENDIAN    |
             REG_DWORD | REG_BINARY    | REG_DWORD_LITTLE_ENDIAN |
             REG_NONE  | REG_EXPAND_SZ ]
           If omitted, REG_SZ is assumed

  /s       Specify one charactor that you use as the separator in your data
           string for REG_MULTI_SZ. If omitted, use "\0" as the separator

  /d       The data to assign to the registry ValueName being added

  /f       Force overwriting the existing registry entry without prompt

Examples:

  REG ADD \\ABC\HKLM\Software\MyCo
    Adds a key HKLM\Software\MyCo on remote machine ABC

  REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
    Adds a value (name: Data, type: REG_BINARY, data: fe340ead)

  REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
    Adds a value (name: MRU, type: REG_MUTLI_SZ, data: fax\0mail\0\0)

  REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d %%systemroot%%
    Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)
    Notice:  Use the double percentage ( %% ) inside the expand string

0
 

Author Comment

by:mikevr6
ID: 35067072
Office has been closed due to local holidays. I'll get back on this today. Thanks!
0
 

Author Closing Comment

by:mikevr6
ID: 35083344
Split the points between the Toms
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Email signature management is something that is often overlooked in many organizations or is simply not implemented effectively. Let's take a look at what methods are available for managing this important piece of corporate branding.
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

708 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

15 Experts available now in Live!

Get 1:1 Help Now