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
cosmic50

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
cosmic50

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
WindowsStar

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
MilesAhead

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
cosmic50

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
cosmic50

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
MilesAhead

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
Thread Forum
System Path variables not passed to NEW CMD prompt.
Random problem or when I install new program or uninstall a program: As I use my pc throughout the day, any new CMD prompts will have a path=(null) and as such I can't use standard windows commands. If I try to go to 'My Computer', 'Properties',... to check on the value of the 'PATH' environment,...
General Discussion
How to fix MBR through command prompt?
Question: What commands could I run in the command prompt during the system recovery? I try & run say "fixmbr" but it doesn't work. Say if I want to write a new master boot record how would I do that?
General Discussion
command prompt
Hi all i need you help me a thing :cry: I went to use autosave all text on command prompt (CMD), how can i do or use what command prompt cade for mark it autosave when i used command prompt. Example : Color 0a
General Discussion
Windows Command Prompt says The System Cannot find the Path Specified
Whenever I launch the Command Prompt, It says "The system cannot find the path specified" under the Copyright Label on the Command Line. Can someone please tell me how to fix this?
General Discussion
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
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 08:44.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App