At times, you might want to run a particular command whenever you log into your account. It can be a ping command or anything else. If so, you can follow this guide to learn how you can use the Task Scheduler, the in-built utility, to run any command via Command Prompt on startup on Windows 11 and Windows 10 computers.
How to run CMD command on startup automatically in Windows 11/10
To run CMD command on startup automatically in Windows 11/10, follow these steps: To learn more about these steps, continue reading. First, you need to open the Task Scheduler on your computer. For that, you can search for task scheduler in the Taskbar search box and click on the individual search result. Then, click on the Create Task button.
Following that, enter the task name and a description in the General tab. Then, expand the Configure for menu and choose the Windows 10 option from the list.
Next, go to the Triggers tab, expand the Begin the task menu and select the At startup option.
Click the OK button, switch to the Actions tab, and click the New button. Make sure that the Start a program option is selected in the Action menu. If so, enter the desired command in this format: For your information, you need to enter the /k parameter to define the command. Let’s assume that you want to pin a website. If so, you need to enter this command:
Once done, click the OK button. It asks you to confirm the command. If a popup appears, click the Yes button to confirm. Next, click the OK button to save the change. Following that, your command will run on startup automatically whether you use Windows 11 or Windows 10. That’s all! Hope this guide helped. Read: Command Prompt cmd.exe keeps popping up on Startup
How do I make Command Prompt run automatically?
There are two ways to make Command Prompt run automatically on Windows 11/10 PC. First, you can add the Command Prompt in the Startup folder on your computer. Second, you can use the Task Scheduler to create a task that will run the Command Prompt on startup. However, if you want to run a CMD command on startup instead of the Command Prompt, you can use the aforementioned guide to get the job done. Read: How to Run commands of Command Prompt with a Desktop Shortcut
How do I add a Command Prompt to Windows 11/10 startup?
To add Command Prompt to Windows 11/10 Startup, you have multiple options. First, you can use the Startup folder to run it whenever you log in. Second, you can use the Local Group Policy Editor to use the Run these programs at user logon setting to set things up. Third, you can use Task Scheduler to add Command Prompt on startup. Whether you want to run only a Command Prompt or a CMD command, you can use the Task Scheduler to get that done. However, it is not possible with other methods. Read: Disable Startup programs in Windows using Task Manager, WMIC, GPEDIT, Task Scheduler, MSCONFIG, Settings.