none
Windows 7 will not read autoexec.bat?

    Question

  • Hi;
    I could not run the ipconfig command from the console, so I needed to set up a path to c:\windows\system32.
    I entered the line path=c:\windows\system32\ into the autoexec.bat file and restarted.
    The system still could not find the ipconfig file.

    I tried creating my own autoexec.bat file (using a different name) and placing it into the startup folder, but that failed to initialize the path.
    Finally, I added the path into the environment variables window, and now it works properly.
    So, I am assuming that autoexec.bat is no longer read by Windows? The file has just one line "REM Dummy file for NTVDM".

    Funny that Windows wouldn't have automatically included the path to \system32 in the environment. Perhaps I did something, because I thought that ipconfig worked from the default command line c:\users\<my user name>

    At this point I am just curious, since I got it working.

    FW
    Sunday, January 03, 2010 5:25 PM

Answers

  • autoexec.bat was only used for DOS based windows like 95, 98 and ME. Stopped being used with 2000.

    You said you could not run the ipconfig command from the console. DO you mean a Command Prompt or from Start / Run? If Command Prompt then check the path environment variable from a Command Prompt window by typing path and pressing Enter.

    The response should start with this:

    PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;


    If not, open Control Panel, System, Advanced System Settings, Environment Variables. Select PATH in the System Variables window and click the Edit button. Add the above to the front of what is currently there. Click OK as needed to close all windows.

    Try ipconfig from a Command Prompt again, it should work.


    Rich
    • Proposed as answer by Shawn B. KeeneMVP Sunday, January 03, 2010 11:48 PM
    • Marked as answer by Vivian Xing Monday, January 11, 2010 9:37 AM
    Sunday, January 03, 2010 5:35 PM

All replies

  • autoexec.bat was only used for DOS based windows like 95, 98 and ME. Stopped being used with 2000.

    You said you could not run the ipconfig command from the console. DO you mean a Command Prompt or from Start / Run? If Command Prompt then check the path environment variable from a Command Prompt window by typing path and pressing Enter.

    The response should start with this:

    PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;


    If not, open Control Panel, System, Advanced System Settings, Environment Variables. Select PATH in the System Variables window and click the Edit button. Add the above to the front of what is currently there. Click OK as needed to close all windows.

    Try ipconfig from a Command Prompt again, it should work.


    Rich
    • Proposed as answer by Shawn B. KeeneMVP Sunday, January 03, 2010 11:48 PM
    • Marked as answer by Vivian Xing Monday, January 11, 2010 9:37 AM
    Sunday, January 03, 2010 5:35 PM
  • I ended up re-installing Windows due to another issue, and after I did so, I can run ipconfig and all other CLU's via the command prompt. Don't know why the path got messed up. Might have been an app I installed, then removed.

    Thanks

    FW
    Monday, January 18, 2010 11:05 PM