A TechRepublic member offers his tip for making the installation of software across many workstations easier with a Windows Registry edit.
If you are a system administrator, you know the frustrations that can occur with configuring all the settings for a particular program or application. This is especially true when you must install the application on hundreds of computers and cannot afford the time to manually input the settings for each instance. This tip is one that I often use at work during these situations, when I cannot find the key in the Windows Registry file that stores the settings for the software.Editor's note: Back up your Windows Registry before you edit the file. A corrupted Registry file could render the operating system inoperable.
This blog post is also available in PDF format in a free TechRepublic download.So let's get to it. First you are going to need to export the registry before you make any changes. This way you can compare it to the Windows Registry that contains the configuration settings later. Regedit allows you to graphically edit the registry (Figure A). You can run regedit by going to Start | Run and typing regedit in the dialog box.
Edit the registry.
As you can see, there are various subkeys, but we will worry about only two of them right now:
- HKEY_LOCAL_MACHINE, and
These two keys most often hold the registry values for the settings and configurations of installed software.Next, we simply right-click on one of the two registry keys (in this case HKEY_CURRENT_USER) and click Export (Figure B).
Export the keys.Save the file as a text (.txt) file as it will make comparison easier later (Figure C). (Note: if you want to use the command-line tool, you should save it as a .reg.)
Save the export.
Repeat these steps for the HKEY_LOCAL_MACHINE key.
ConfigureNow that we have the registry saved, go ahead and change the settings for the software. Once you have changed the settings and verified that the software is running correctly, repeat the previous steps for exporting the registry (Figure D).
This second export is neeeded because we must compare the first registry that we exported before any changes were made to the exported registry after we changed the settings. The differences will show us what needs to be changed, so that when we install the software on many computers, they are already configured with the correct settings for the user.OK, now that we have the registry keys before and after the software settings were changed, we need to compare them. At my job, we use a program called Workshare to compare Word documents for changes, but it also works for just plain text. Input the before and after text files we saved and click OK; this will start comparing the two documents for any changes (Figure E).
Compare text file exports.Because the registry is very large, it can take some time to compare the documents. If you are still in the process of documenting the install or have other work, now is a good time to get it done (Figure F).
Slow and steady progress is made.
After it is done comparing, if no changes were found, you need to repeat the process for the other registry key (HKEY_LOCAL_MACHINE).
Now that we have the registry key(s) and the values of that key(s), we will modify the install of the software to match the change(s). This allows us to push out the software to any number of computers with the settings already configured during installation.At my company we push out our applications through SCCM using VBScript. This is especially convenient not only because VBScript has built-in functions for modifying and writing to the registry, but also because it can run the .MSI or .EXE installer of the software. This allows the one script to both install and configure all the settings for the software, not only making debugging faster and easier but also ensuring the user has the correct configuration (Figure G).
Look at an example comparison - Red is the previous value, blue the current value.For those of you comfortable with the command line, there is a tool that you can use called FC (stands for File Compare). It is also a lot faster than Workshare, but it is not as easy to read the results (Figure H).
File Compare displays these results.After running the command, you get a text file that looks like Figure I.
This is a text comparison from the command line.
On March 31, 2010, I republished an article from several years ago in the TechRepublic Microsoft Windows Blog, "10 Cool Registry Edits and Tweaks for Windows XP." Almost immediately, I received a snarky remark suggesting that I should publish only new tips regarding Windows XP. These comments irked me. So, I issued a challenge. I offered to pay a $300 bounty to anyone who could conceive of and then write, in a coherent publishable manner, a Windows XP tip that has never been published on TechRepublic before. So far, only one person has been able to meet the requirements. Have you got a new Windows XP tip for the Windows Blog in you? The bounty is still on, but have you got what it takes to collect?
Stay on top of the latest XP tips and tricks with TechRepublic's Windows XP newsletter, delivered every Thursday. Automatically sign up today!