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.
81 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\System32or 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\System32or other path for the value.