简体   繁体   中英

The specified path is not valid

I am in a windows console or powershell. (Windows7 x64 Pro, PowerShell 4)

When i try to type command like "cmd" i have an error message "The specified path is not valid"

PS D:\DevEnv\workspace\api-node> cmd
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All right reserved.
The specified path is not valid.

What i tryed after reading msdn articles but it don't solve the problem:

-delete my System variable PATH and try again

-clean my registry with ccleaner

Is there any "verbose" or "debug" mode in powershell or windows console to see what path is involved and where i can change it?

Is there any "verbose" or "debug" mode …? I don't think so; however, running next commands from an open cmd window could help to identify possible error source(s):

wmic process where "name='cmd.exe'" get Caption, CommandLine, ParentProcessId, ProcessId
2>NUL reg query "HKLM\Software\Microsoft\Command Processor" /V AutoRun
2>NUL reg query "HKCU\Software\Microsoft\Command Processor" /V AutoRun

In above output we are seeking for any commands which could be a source of The specified path is not valid error message.

  • wmic seems to be self-explaining;
  • both reg query show AutoRun registry values (if present), see cmd /? .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM