Jump to content

How to Alter Cmd.Exe Start Directory

From freem
Revision as of 08:35, 21 March 2023 by Lukegao1 (talk | contribs) (创建页面,内容为“ To alter the default start directory of Cmd.exe in Windows, you can follow the steps below: 1. Open the Run dialog box by pressing the Windows key + R on your keyboard. 2. Type "regedit" in the Run dialog box and press Enter. This will open the Registry Editor. 3. In the Registry Editor, navigate to the following location: HKEY_CURRENT_USER\Software\Microsoft\Command Processor 4. In the Command Processor key, locate the String value named "Autorun" (i…”)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


To alter the default start directory of Cmd.exe in Windows, you can follow the steps below:

1. Open the Run dialog box by pressing the Windows key + R on your keyboard.

2. Type "regedit" in the Run dialog box and press Enter. This will open the Registry Editor.

3. In the Registry Editor, navigate to the following location:

  HKEY_CURRENT_USER\Software\Microsoft\Command Processor

4. In the Command Processor key, locate the String value named "Autorun" (if it doesn't exist, you can create it by right-clicking on the right pane and selecting New > String Value).

5. Double-click on the Autorun value to edit it.

6. In the Value data field, enter the desired default directory enclosed in quotes, for example: "C:\Users\YourUserName\Desktop". Make sure to replace "YourUserName" with your actual user name.

7. Click OK to save the changes.

8. Close the Registry Editor.

Now, when you open the Command Prompt, it should automatically start in the directory you specified in the Autorun value.