How do I change the default command prompt directory in windows 7?

When I open command prompt it's now defaulting to the user folder rather than system32 as it used to.

How do I permanently change it back to system32 like it's supposed to be rather than just a temporary CD command?

I have read that this change has occurred due to an installed program changing an environment variable but not sure how to correct it.

This is a windows 7 machine so there is no right click "open in file location" setting.

Thank you.

8

1 Answer

For Windows 10, there are multiple ways to change the default CMD path; one of these might also work on archaic versions.

  • Using a Windows shortcut:

    • Right-click a folder (or desktop).
    • Select New > Shortcut.
    • In Type the location of the item, enter cmd.exe, click Next and Finish.
    • Right-click the new shortcut and select Properties.
    • In Start in:, enter C:\Windows\System32 or other path.
  • Using a Registry change:

    • Open Regedit.
    • Browse to Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor (or copy/paste that key into the location bar).
    • Rigjht-click the right pane and select New > String Value.
    • Name the new REG_SZ Autorun.
    • Double-click the new value and enter cd /d C:\Windows\System32 or other path for the value.
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like