How to change default path of cmd when i open it #cmd #defaultpath #dos #ms-dos #msdos #commandprompt #windows

 To change the default starting path of the Command Prompt (CMD) in Windows, you can use one of the following methods:


### Method 1: Change Shortcut Properties


1. **Create a Shortcut:**

   - Right-click on your desktop or in the folder where you want the shortcut, then select **New** > **Shortcut**.

   - For the location of the item, type `cmd.exe`, and click **Next**.

   - Name your shortcut and click **Finish**.


2. **Modify Shortcut Properties:**

   - Right-click on the new shortcut and select **Properties**.

   - In the **Shortcut** tab, find the **Start in** field.

   - Enter the desired path (e.g., `C:\YourDesiredPath`).

   - Click **OK** to save the changes.


Now, when you open CMD using this shortcut, it will start in the specified directory.


### Method 2: Using the Registry Editor


**Note:** Be careful when using the Registry Editor, as incorrect changes can affect system stability.


1. Press `Windows + R`, type `regedit`, and press **Enter** to open the Registry Editor.

2. Navigate to the following path:

   ```

   HKEY_CURRENT_USER\Software\Microsoft\Command Processor

   ```

3. If there’s no `Command Processor` key, right-click on **Microsoft**, select **New** > **Key**, and name it `Command Processor`.

4. In the right pane, right-click and select **New** > **String Value**.

5. Name it `AutoRun`.

6. Double-click `AutoRun` and set its value to:

   ```

   cd /d C:\YourDesiredPath

   ```

   Replace `C:\YourDesiredPath` with your desired starting directory.

7. Close the Registry Editor.


After making this change, every time you open CMD, it will start in the specified path.


### Method 3: Use Command Prompt Properties (for new sessions)


1. Open CMD.

2. Right-click on the title bar and select **Properties**.

3. In the **Options** tab, under the **Edit Options** section, enable **QuickEdit Mode** and **Insert Mode** if desired.

4. In the **Layout** tab, adjust the size and position if needed.

5. Click **OK** to apply changes.


This method does not change the starting directory, but it improves the usability of CMD in general.


### Conclusion


Using any of these methods, you can change the default path of CMD to start in a location that suits your needs. If you have any questions or need further assistance, feel free to ask!

Comments