The Categorizer

the categorizer logo

How To Run Command Prompt on Startup in Windows (2 Ways)


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.

how to run command prompt at startup in windows 11

By the end of this article, you’ll be able to run command prompt at startup in Windows:


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.

typing file path in run to locate command prompt in windows 11
File Path – C:\WINDOWS\system32\

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

locate and copy cmd icon from system 32 folder in windows 11
Copy cmd.exe application icon

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.

typing shell startup in windows run to open command prompt at startup
Command – shell:startup

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

paste cmd application in startup folder in system32 in windows 11
Paste cmd.exe program

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.


Step 1: Search for “Task Scheduler” in the Start Menu and run it as an administrator.

task scheduler app icon in windows 11
Task Scheduler App Icon

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

select create task option to schedule command prompt at startup in windows 11
‘Create Task’ option

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.

configure general settings in task scheduler to open command prompt on startup in windows 11
Configure General Tab

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

select new button in trigger tab
‘New’ button

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

set begin the task option to startup
Begin Task: ‘At Startup’

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

click the new button in action tab
‘New’ button

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.

configure action tab in task scheduler
Configure ‘Action’ tab

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.

task to open command prompt at startup added in action tab
Task Added, press the ‘OK’ button

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.

task added in active tasks list in task scheduler
Active Tasks List

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.


auto backup registry in windows 11 for device maintenance

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.

how to enable storage sense in windows

Enable Storage Sense in Windows 11

Try saving some space in your device automatically using the Windows Storage Sense Feature.

how to hide taskbar automatically in windows 11

Hide Taskbar Automatically in Windows

Increase your display size slightly by some pixels by auto hiding taskbar when it’s not in use.

Manage additional optional feature in windows

Optional Features in Windows

Manage the Advanced Optional Features to get the most out of your Windows 11.

Take a Minute to Share This Article.
How To Use Clipboard History in Windows 11