Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Command Prompt - Path messed up


15 Sep 2010   #1

Windows 7 Home Premium 64bit
 
 
Command Prompt - Path messed up

I was editing the command prompt path and my command prompt stopped working. Here's what the path is:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\

I tried a dozen different paths after I accidentally deleted it when editing something into it. Nothing worked. any idea what's wrong?

My System SpecsSystem Spec
.

15 Sep 2010   #2
mjf

Windows 7x64 Home Premium SP1
 
 

environmental variable %systemroot% should be set to c:\windows
cmd.exe is in c:\windows\system32 or %systemroot%\system32

also your "....powershel l..." should be "...powershell..."

Sugesstion: if you are going to alter system variables keep track of what (?&why?) you're changing them.
My System SpecsSystem Spec
15 Sep 2010   #3

Windows 7 Home Premium 64bit
 
 

The command prompt still isn't working. I changed it to:

C:\Windows\system32;C:\Windows
My System SpecsSystem Spec
.


15 Sep 2010   #4
whs
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8
 
 

Go into the system32 folder, find the cmd.exe, right click on it and create a shortcut of that. You can also pin it to the start menu or taskbar.
My System SpecsSystem Spec
15 Sep 2010   #5

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

If you wish to restore it to the default:

The default path is:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShel l\v1.0\

Note: (The Forum site adds the extra space in PowerShell above there is NO Space)

You can directly edit the Registry at:

HKLM\System\CurrentControlSet\Control\Session Manager\Environment\Path
My System SpecsSystem Spec
15 Sep 2010   #6

Windows 7 32 bit
 
 

Also for stuff like this it's a good idea to back up using something like ERUNT or a restore point, when everything is working. Save the variables to a file from the command prompt before making any changes. If you only have to fix one string then you can avoid the reboot of a ERDNT or restore point restore, by looking in the file to see exactly how the string is done.
My System SpecsSystem Spec
15 Sep 2010   #7

Windows 7 Home Premium 64bit
 
 

I set it to the default which was given above. Here is the current path:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShel l\v1.0\

Here is a screenshot of the command prompt:



And yes, I photo-shopped out my user directory for privacy reasons. The black area should be \myAccountUsername
My System SpecsSystem Spec
16 Sep 2010   #8
mjf

Windows 7x64 Home Premium SP1
 
 

You originally post said your command prompt wasn't working now it is using the same path you originally posted.
What's the problem?
Did the unix like "ls" ever work under your windows 7 command shell? - It doesn't under mine. I recall it working under XP.
My System SpecsSystem Spec
16 Sep 2010   #9

Windows 7 Home Premium 64bit
 
 

It worked prior to when I accidentally deleted the path.

Hmm, I learned how to use the command prompt in linux and I was glad when the same commands worked. Anyway, I googled some of the window equivalents. The path was broken, yes, I just didn't know how to properly check if it was working. I wonder if it's possible to get the linux commands working again.
My System SpecsSystem Spec
16 Sep 2010   #10

Windows 7 32 bit
 
 

I'd try with this:

GnuWin32 Packages

There should be setup info with each package.
I used to run some of the linux command ports. Many of the stand-alone exes will work from a regular command prompt but a lot of the scripting and other gizmos require running bash or another shell. You probably need to set up the bin folder in your path etc..

edit: ok I think I misread what mjf meant. He's saying even set up properly the linux stuff may not work in Vista or later... nevermind.
My System SpecsSystem Spec
Reply

 Command Prompt - Path messed up




Thread Tools



Similar help and support threads for2: Command Prompt - Path messed up
Thread Forum
Help needed executing command prompt command General Discussion
command prompt General Discussion
Windows Command Prompt says The System Cannot find the Path Specified General Discussion
Run administrative command prompt from command prompt General Discussion
Solved Command Prompt General Discussion
command prompt bug ? General Discussion
Command Prompt command <ipconfig> not working Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:44 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33