Command Prompt - Path messed up

Page 1 of 2 12 LastLast

  1. Posts : 7
    Windows 7 Home Premium 64bit
       #1

    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 Computer


  2. mjf
    Posts : 5,969
    Windows 7x64 Home Premium SP1
       #2

    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 Computer


  3. Posts : 7
    Windows 7 Home Premium 64bit
    Thread Starter
       #3

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

    C:\Windows\system32;C:\Windows
      My Computer


  4. whs
    Posts : 26,210
    Vista, Windows7, Mint Mate, Zorin, Windows 8
       #4

    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 Computer


  5. Posts : 2,737
    Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
       #5

    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 Computer


  6. Posts : 5,092
    Windows 7 32 bit
       #6

    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 Computer


  7. Posts : 7
    Windows 7 Home Premium 64bit
    Thread Starter
       #7

    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 Computer


  8. mjf
    Posts : 5,969
    Windows 7x64 Home Premium SP1
       #8

    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 Computer


  9. Posts : 7
    Windows 7 Home Premium 64bit
    Thread Starter
       #9

    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 Computer


  10. Posts : 5,092
    Windows 7 32 bit
       #10

    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 09:00.
Find Us