Link to home
Start Free TrialLog in
Avatar of E=mc2
E=mc2Flag for Canada

asked on

How can I default the command promt in Windows 10 to the C drive?

When I open a command promt, it defaults to the S drive, not the C drive.
My scripts are therefore not working the way they were designed..

How can I configure the default to be C, instead of S for the command prompt in Windows 10 pro?
Thank you.
Avatar of Edward Pamias
Edward Pamias
Flag of United States of America image

In the command prompt shortcut just add..

C:\Windows\System32\cmd.exe /k "cd c:\"
ASKER CERTIFIED SOLUTION
Avatar of pjam
pjam
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could also modify your scripts so they start in the correct place - that's the better long term solution since you'll have to do this otherwise on any system you copy the scripts to/user that uses them.
Open regedit and browse to this path

HKEY_CURRENT_USER\Software\Microsoft\Command Processor
Create new string vale named Autorun. Set its value to cd /d C:\. (Here whatever path you mention, next time on wards your command prompt will open in that path only)

Run cmd again.

Try your luck, I tried and it worked.