View Full Version : Automating the regedit
lphoto1
11-20-1999, 02:24 AM
I have a need for a utility that will allow me to make changes to the registry based on a pre-determined configuration. I need to make these changes to about 100 machines without having to manually edit the registry on each computer. Anyone know where I can get something like this that would automate the process?
Anonymous
11-21-1999, 05:08 PM
just copy your registry to every machine
jstolz
11-22-1999, 03:43 AM
Why won't a reg or inf file work? Is this based on a certain hardware profile varying from machine to machine?
Regards...
jstolz
11-22-1999, 03:45 AM
.
lphoto1
11-22-1999, 04:33 PM
After posting this I decided that a reg or inf file would work. I do not know alot about inf files but this seems like the way to go. Any info as to where I could get some examples? This will only make changes to non-hardware specific items, i.e. wallpaper, screen savers,winlogin messages, etc.
jstolz
11-23-1999, 03:06 AM
Well, if you're not deleting reg keys, only changing them, then .reg files are the way to go. The easiest thing to do is simply fire up regedit and navigate to the key or value you want to change. Then simply export that branch to a new reg file and open it with any text editor to see what the syntax is for a reg file.
If you decide on an inf file; they too are text files. Here's some info on them:
To create an .inf file to automatically delete registry entries, follow these steps:
1.Use any text editor (such as Notepad) to create the sample Del-reg.inf file shown below. Note that
Del-reg.inf is not a required name, but it is used in these instructions.
; This file called Del-Reg.INF deletes the registry entries listed
; under the [RegChange] section. In this example it deletes the
; UserName value name under the key HKLM\network\Logon
[Version]
signature="$CHICAGO$"
[DefaultInstall]
; DelReg = RegChange
[RunIt]
DelReg=RegChange
[RegChange]
HKLM,Network\Logon,username
HKLM,Network\Logon\keyname,
Notes for this Sample File
The line below the [DefaultInstall] section is remarked out with a semicolon to prevent someone from accidentally running
the .inf file. If you want the option to run the .inf file without using Rundll, you should remove the semicolon.
RunIt is an arbitrary section name in the .inf file that should be executed.
The value following RunIt has the following meanings:
0 - Informs Windows 95 that a reboot is not necessary.
1 - Always silent reboot
2 - Always prompt reboot
Below the [RegChange] section is a value called username and a value called keyname to be deleted. These are sample
entries and should be modified to list the registry entries that you want to be removed.
The entry in the [RegChange] section lists the registry entry or entries that you want to remove. Below are some guidelines
for the proper syntax:
root-key, sub-key, [value name]
The value name is optional and is denoted by the [] brackets. The comma place holder shown above must be included in
this line. Please note that if the sub-key or Value name contains spaces you need to use quotes. Registry entries between
quotes may be case sensitive. For example:
HKLM,SOFTWARE\"XYZ inc"\settings,,
The root-key is represented by one of the following abbreviations:
HKCR is short for HKEY_CLASSES_ROOT
HKCU is short for HKEY_CURRENT_USER
HKLM is short for HKEY_LOCAL_MACHINE
HKU is short for HKEY_USERS
The sub-key is the continuation of the path to the value to be changed, for example:
HKLM,SOFTWARE\Microsoft\Windows\currentVersion\Fon ts
removes the Fonts Key and all of its contents.
The value name entry allows the definition of a particular entry to be removed from a sub-key.
To run this sample file automatically when you log on to your computer, type the following line in the login script:
RunDLL setupx.dll,InstallHinfSection RunIt 0 path\Del-Reg.inf
where path is the location of the Del-reg.inf file. You can use a physical drive letter from your local computer and a path, or
a Universal Naming Convention (UNC) path like \\server\sharename.
Additional query words:
Keywords : kbenv win95 win98
Version : WINDOWS:95
Platform : WINDOWS
Issue type : kbhowto
lphoto1
11-23-1999, 02:43 PM
Thanks for the detailed response. This is the information I have been looking for. I think the .reg file is the easiest way to go. I used it yesterday and got the desired results. I am in a school district and every machine that we obtain must have a few things set that are the same for every machine in the district. Thanks again.
FPOIRIER
11-23-1999, 05:05 PM
If you are using a network you can use the
user script to turn on or off some keys with your
regon/regoff files.
ex of my NT script files:
net use....
regedit /s \\yourserver\regon.reg
;regedit /s \\yourserver\regoff.reg
vBulletin® v3.8.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.