
On most "modern" Windows installations, the PRN device is no longer available, as it requires an LPT or COM port. Unfortunately, this won't work for CON (console or display). Instead of a file name, some device names can be used: REGEDIT /E PRN "HKEY_XXXX\Whatever Key" The resulting (ASCII or UniCode) file will contain the entries in the format "key"="value", which can be stripped and parsed using Laurence Soucy's CHOICE trick for MS-DOS 6 and Windows 9*, NT's FOR /F or the more generic TYPE and FIND commands. This will write the registry key " HKEY_XXXX\Whatever Key" and its subkeys to a file named d:\path\filename.REG REGEDIT's /E switch can be used to export a registry key: REGEDIT /E d:\path\filename.REG " HKEY_XXXX\Whatever Key" How to remove an individual registry key or value using *.INF files and RUNDLL is explained by Bill James. This is demonstrated in the UniqueID.bat example below, a batch file that forces a new LANDesk agent ID. Will remove the individual value "ValueToBeRemoved" from "DummyTree". To remove an individual item from the registry, place the minus sign after the equal sign: REGEDIT4 REG file, just add a minus sign before the tree name: REGEDIT4 To remove an entire "tree" from the registry using REGEDIT and a. This is demonstrated in the DefOpen example in the Examples section. REG files are in readable ASCII, they may be created "on the fly" by our batch files. The /S switch is optional, it skips the message dialogs before and after the import of the *.REG file. REG.EXE can read a single key and value directly, without the need for a temporary file.Īdding and editing (importing) registry entriesĪdding items to the registry requires a *.REG file: REGEDIT addsome.REG In Windows 2000, REG.EXE is available on the installation CD-ROM, but has to be installed manually (on the CD-ROM run "\SUPPORT\TOOLS\SETUP.EXE").Īs of Windows XP, REG.EXE is a native command. Microsoft's NT 4 Workstation and Server Resource Kits come with REG.EXE, a utility that makes reading (or editing) NT's registry easier. This page focuses on reading and editing the registry in unattended mode only. I would not have mentioned it here, however, if it couldn't be used in unattended mode as well. REGEDIT is usually known as a GUI tool to search or edit the Windows registry. Specify the location of the user.dat to use Specify the location of the system.dat to use hide confirmation box when importing files REGEDIT.EXE /E exportfile.REG " registry_key"įile name the information should be written to Read Microsoft's Knowledge Base article Q318149 to learn How to Maintain Current Registry Backups in Windows NT 4.0 and Windows 2000. If anything goes wrong, you may end up losing all your data and reinstalling Windows.Īs Microsoft states it, editing the registry ". VoltCraft Energy Logger 3500 Configurationīefore tweaking the registry, make sure you have a full backup of your system.
