Walker News

Configure Windows Registry In Command Prompt

You might have learnt about Reg.exe command in some of the Registry-related tweaking articles – and I have this command in some of my posts too.

Registry Console Tool, the descriptive name of Reg.exe, is a simple command line program used to manipulate or configure Windows Registry keys from Command Prompt, Windows Batch program, Windows script, etc.
If all you need is just to write a really simple one-click program to tweak the Windows Registry keys, you can either create a Windows Registration File (the .REG file extension) or using the Registry Console Tool command.

For added features such as program intelligence and user interaction, you could write a Windows script to call the WSH functions – the WshShell.RegWrite and WshShell.RegRead function to manipulate Windows Registry keys directly or the WshShell.Exec function to get Reg.exe do the job.

How to create the .Reg file or Registration File for a particular Registry key and all its associated values in Windows Vista?
  1. Open up Windows Registry Editor and locate the destination Registry key
  2. Right-click the Registry key and click Export option from the pop-up menu
  3. In the Export Registry File dialog box, select the target folder to save the to-be-created .REG file, give the Registration File a name, leave the Exported Range option to stay as Selected Branch, and click the Save button.

Once the .REG file created, you can easily recreate the key and associated values on another computer – just save the .REG file on the target Windows machine and double-click it. Having say that, one can also backup the whole Windows Registry keys (for restoration in the case of Windows Registry corruption) by selecting ALL option of the Export Range section in Export Registry File dialog box!

How to manipulate the Windows Registry keys from command line with the Reg.exe or Registry Console Tool in Windows Vista?

Open up an elevated Command Prompt window in Windows Vista and type reg /? – the Windows Vista Ultimate version of Registry Console Tool allows one to perform Registry tasks such as QUERY, ADD, DELETE, COPY, SAVE, LOAD, UNLOAD, RESTORE, COMPARE, EXPORT, IMPORT, and FLAGS.

Hence, things that can be done in Registry Editor are well supported by Reg.exe tool as well. Best of all, Reg.exe allows one to write a Batch program or Windows script to automate the tasks!

To understand how each of the Reg.exe options going to work, e.g. the ADD option, you can type reg add /? in the Command Prompt window. And, remember to get an elevated Command Prompt window in case of writing to Windows Registry in Windows Vista.

For an intelligent Windows scripts or Batch file, always use the Reg.exe return code to confirm the Reg.exe command has committed successfully or fail at errors – 0 means successful or 1 means failure.

Download the Reg.exe tool from Microsoft Download Center

Should you need a copy of Reg.exe to run on Windows Server 2003, Windows XP or Windows 2000, download either one of the Microsoft Platform Support Reporting Utility package.

This is the Reg.exe version 2.x but works similar to Reg.exe in Windows Vista Ultimate, except missing the additional FLAGS option.

Personally, I prefer to download the smaller file size package, i.e. the Software Update Services package. It’s a self-extract package which you could unzip the content by double-click the file or by using Power Archiver and copy the Reg.exe program to one of the folder in %PATH% environment variable (by executing set PATH or echo %PATH% in Command Prompt window). The best bet is on Windows installation directory, i.e. C:\winnt (for Windows 2000) or C:\windows (for Windows XP and Windows Vista).

Review of adding, deleting or changing Windows Registry keys with Reg.exe in Windows Vista

1) How to add Copy To Folder or Move To Folder option in Context menu?

2) How to change the Remote Desktop listening port number?

3) How to tweak or disable UAC in Windows Vista Command Prompt?

4) How to change or spoof Internet Explorer User Agent String value?

5) How to tweak the Vista Bubbles screen saver hidden settings?

Custom Search

  1. Walker 09-08-07@11:32

    Another good point of this Registry Console Tool (REG.EXE) is the built-in support of Remote Registry feature – meaning that you can use Reg.exe to edit the Registry of a remote Windows PC.

    So, it’s true to say that whatever features supported by the Windows Registry Editor can be found in Reg.exe – the command line Registry Editor!

  2. How To Change IE 7 Window Title Text – Walker News 05-09-07@00:49

    [...] Registry Console Tool or Reg.exe command [...]

  3. How To Add An OEM Logo To Vista System Properties – Walker News 13-04-08@23:44

    [...] Now, open up Windows Registry Editor,i.e. [...]

2014  •  Privacy Policy