Place ApplyReg.vbs, your registry file, and your input file on the computer from which you'll run ApplyReg.vbs (which I call the source computer). Make sure that the source computer has WSH 5.6 installed. ApplyReg requires WSH 5.6 because it relies on the WshNamed object and the WScript object's StdOut property. These two features aren't available in earlier versions of WSH. You can download WSH 5.6 for Windows 2000, Windows NT 4.0, Windows Me, and Windows 98 from http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp. Windows Server 2003 and Windows XP already include WSH 5.6. However, Microsoft released a build update for WSH 5.6 in XP. You might want to download and install that update if you haven't done so already.
The source computer and all the target computers require WMI. The source computer requires WMI to make a remote connection to each target computer's WMI repository. Each target computer needs WMI's Registry Provider (StdRegProv) to make the registry updates. All computers running WMI have StdRegProv in the root\default namespace.
Except for NT 4.0 and Win98, all Windows OSs include WMI. You can download WMI CORE 1.5 for Win98 from http://msdn.microsoft.com/library/default.asp?url=/downloads/list/wmi.asp. The WMI CORE 1.5 download for NT 4.0 isn't available on the Microsoft site, so I've included it in the 40714.zip file.
Testing the Script in the Lab
After you have your lab set up, you can test ApplyReg.vbs. As an example, let's apply a registry file named update.reg to update the registry of the target computers listed in the input file named computers.txt. After you create update.reg and computers.txt following the instructions I gave previously, copy ApplyReg.vbs, update.reg, and computers.txt to a directory. Open a command-shell window, change from the current directory to the directory that contains the three files, and type
cscript applyreg.vbs
/r:update.reg /f:computers.txt
(Although this command appears on two lines here, you would enter it all on one line when you type it on the command line.) Press Enter. ApplyReg.vbs applies the changes specified in update.reg to all the machines in computers.txt and provides a report that states whether the update was successful. The report's unique filename appears after the script has finished creating it. After the test run, make absolutely sure that the update didn't damage the registry or interrupt any target computer's normal operation.
Next, on a test computer not listed in computers.txt, apply update.reg manually. One way to do this is to navigate in Windows Explorer to the folder that contains update.reg and double-click the file. Compare the manual registry modifications with the registry modifications that ApplyReg.vbs automatically deploys.
Running the Script in Production
If ApplyReg.vbs is successful in the lab, you can begin deploying the update in your production network. I suggest that you start small by updating just a handful of target computers in your production network. Verify that all the target production computers function properly after the update. If all the target computers check out, you can slowly increase the number of target computers. Check the report after each script run. The report will inform you whether a computer was unreachable, whether the input list had an incorrect DN, or whether another error prevented access to the remote registry. You can use the report's information to determine which computers require additional runs of ApplyReg.vbs. If you can't access a remote registry because of a permission problem, verify that you have administrator or equivalent permissions on the remote computer. By default, you must have administrator rights to perform remote registry updates. For more information about remote registry permissions, see the Microsoft article "How to Restrict Access to the Registry from a Remote Computer" (http://support.microsoft.com/?kbid=153183).
Prev. page
1
[2]
3
4
next page