I am getting a 'REGEDIT' is not recognized error when running a batch file.

Document ID : KB000011328
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

I am getting a 'REGEDIT' is not recognized error when running a batch file.

Answer:

The path to REGEDIT must be added to the Environment Variable Path on the machine where the batch file is being run.

  1. Do a search for the location of the REGEDIT.exe on your machine.

  2. Set the system environment variable path to point to the location by following the steps below.

  3. From the desktop, right-click My Computer and click properties.

  4. In the System Properties window, click on the Advanced tab.

  5. In the Advanced section, click the Environment Variables button.

  6. Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

    C:\Program Files;C:\Winnt;C:\Winnt\System32

    Figure 1