Overview – Run Command Prompt on Startup
It appears that you are a programmer or learning command-line, and want to open command prompt on startup instead of opening it manually every time you boot your computer.

By the end of this article, you’ll be able to run command prompt at startup in Windows:
1. Run Command Prompt on Startup in Windows with Shell Command
Step 1: In the start menu, search for Windows Run and open it or press the “Windows Logo key + R” key combination, type: C:\WINDOWS\system32 and hit the enter key. The system32 folder opens in a new window.
Remember to change the name of your main drive from C: to the actual name that your device possess.

Step 2: Scroll down and copy the “Cmd.exe” application.

Step 3: Again, press the “Windows Logo key + R” key combination to open Windows RUN, type: “shell:startup” (without quotation marks) and hit the enter key.

Step 4: Paste the Command Prompt Application in the Startup folder.

Next time onwards when you restart your device, the Command Prompt will run at the startup automatically.
NOTE: To remove the command prompt from running at startup, simply open Windows RUN, type – shell:startup and delete the Command Prompt Application from the folder.
2. Run CMD on Startup in Windows with Task Scheduler
Step 1: Search for “Task Scheduler” in the Start Menu and run it as an administrator.

Step 2: Select the “Create Task” option from the right sidebar.

Step 3: Add the name of Task (say, Run CMD on Startup). Check the “Run only when user is logged in” option. Now, if you want to run the application with the “Highest Privileges” or as Administrator, click the checkbox.

Step 4: Select the “Triggers” tab and click on the “New” button. The “New Trigger” panel will appear in a new window.

Step 5: Set the “Begin the task” option to “At Startup” from the dropdown menu and click the “OK” button.

Step 6: Select the “Actions” tab and click the “New” button. The “New Action” panel will appear in form of a pop-up.

Step 7: Set the “Action” option to “Start a program” and add the following path in the “program/script” option: C:\WINDOWS\system32\cmd.exe.
Remember to change the name of your main drive from C: to the actual name that your device possess.

Step 8: The task will be added in the Action Tab. Now, click the “OK” button and the task will be scheduled for the next time you boot the device.

NOTE: To check if your custom task is set properly, click the “Active Tasks” option, scroll, and if you find the task means you have configured the task properly and the Command Prompt will run on startup next time when you boot your device.

Next Steps
We’ve explained how to run command prompt at startup in Windows 11. You can use any one of the methods listed above.
If you like to automate the maintenance tasks in Windows, then you should check out our articles related to Maintenance Automation in Windows.
Further, automate the maintenance settings on your computer by referring the related articles below.
Related Articles
Automatically Backup Registry in Windows
If you keep configuring your device’s settings, then it’s better to automate the registry backup in your device to recover windows built-in settings if any unexpected data loss takes place.
Enable Storage Sense in Windows 11
Try saving some space in your device automatically using the Windows Storage Sense Feature.
Hide Taskbar Automatically in Windows
Increase your display size slightly by some pixels by auto hiding taskbar when it’s not in use.
Optional Features in Windows
Manage the Advanced Optional Features to get the most out of your Windows 11.