Not sure what I did but since past 5 weeks but I am getting this error The system cannot find the path specified. when I run any command or start cmd. Here is what I get when I start command line:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
The system cannot find the path specified.


How do I troubleshoot this error?

2 Answers 2


Try the following.

  1. Open the Registry Editor (press +R, type regedit and hit Enter) .
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun and clear the values.
  3. Also check HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun.


  • Also look at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment for the ComSpec
    – Kevin
    Aug 4, 2017 at 0:03
  • 1
    Any other tricks? I get the same issue, but don't have AutoRun under Command Processor?
    – Didier A.
    Oct 25, 2017 at 3:34
  • Same here, neither paths have "AutoRun"
    – Flion
    Feb 15, 2020 at 4:58
  • Same here, no AutoRun entry, but same error as the original poster. Aug 13, 2020 at 13:09
  • 2
    If finally found an AutoRun entry (from a removed Anaconda installation) under quite "exotic" key": Computer\HKEY_USERS\S-1-5-21-1022529333-140522832-1157387970-3781\Software\Microsoft\Command Processor This only showed up as the third or fourth hit while searching for "Command Processor" (in Keys). Which means you probably need to fiddle around a bit to be successful.
    – GWD
    Sep 24, 2020 at 17:20

Your Path must be wrong. The issue is that your command prompt can't find any programs to match what you're entering.

  • From your desktop, rick-click "My Computer" and click "Properties"
  • In the System Properties window, click on the Advanced tab.
  • In the Advanced section, click the Environment Variables button.
  • In the Environment Variables window , highlight the Path variable in the Systems Variable section and click the Edit button.

I don't know the default PATH values you need, but I am willing to bet you have something that isn't right. Post what you have here.

  • There were couple of invalid paths. I removed them, rebooted but still getting same error. I checked Path for my username and also system.
    – Maximus
    Mar 11, 2014 at 0:14
  • Same issue .. if I run CMD (as admin) no error. If I run a cmd as "normal" user I also get this error whenever invoking "CMD" And I can quite surely exclude the PATH being messed up - since in order to test this I just deleted every entry in it and the error STILL pops up.
    – GWD
    Sep 24, 2020 at 17:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .