For many people, a laptop or desktop PC is an indispensable tool. Whether it’s getting work done, keeping in touch with family and friends or switching off at the end of a long day, a device running Windows can do it all.
To help keep everything running smoothly, Windows automates many maintenance tasks in the background, including checking for updates and removing temporary files. These rely on the Task Scheduler, a tool which can also be customised with scripts of your own.
At its most basic, this can be used to open certain apps when specific criteria are met. But you can get more advanced, with the ability to run almost any command you’d run in Windows PowerShell.
We’re using a Windows 11 device for the purposes of this tutorial, but it’s the exact same method on Windows 10.
How to automatically open any app in Windows
- Time to complete: 5 minutes
- Tools required: A Windows device and app you’d like to open automatically
Search for and open the Task Scheduler app
Anyron Copeman / Foundry
Right-click ‘Task Scheduler Library’ in the left pane, then choose ‘New Folder…’. Give it a meaningful name and hit enter

Anyron Copeman / Foundry
Double-click the ‘Task Scheduler Library’ folder to expand, then double-click your newly created folder to select it. Right-click anywhere in the blank table and choose ‘Create Basic Task…’

Anyron Copeman / Foundry
Give the task a meaningful name – in this example, it’s ‘File Explorer launcher’ – then click ‘Next’

Anyron Copeman / Foundry
From the next screen, choose how often you want the task to run and click ‘Next’ again

Anyron Copeman / Foundry
Specify the start time and date, then choose how often you want it to repeat and click ‘Next’

Anyron Copeman / Foundry
From the next screen, make sure ‘Start a program’ is selected (the other options are no longer supported by Microsoft) and choose ‘Next’

Anyron Copeman / Foundry
Click the ‘Browse…’ button next to ‘Program/script’ box and locate the .exe file for the specific app you want to open. The ‘System32’ app will launch by default, but the file you’re looking for might be within ‘Windows’ instead

Anyron Copeman / Foundry
There’s no need to add the optional fields – just click ‘Next’, followed by ‘Finish’ to confirm

Anyron Copeman / Foundry
The app will now open at the specific time, or as soon as possible after your device is turned on. This can be repeated as many times as you’d like.
How to automatically run a command in Windows
If you’re willing to put in some time and effort, you can set Windows to carry out more complex tasks automatically. In theory, any command that works in Windows PowerShell can be automated.
Here, we’ll be setting Windows to automatically lock your device at 6pm each workday. This is an easy way to signal that you should stop working, without risking losing any of your work.
- Follow steps 1-5 as above
- Right click your created folder, then choose ‘Create Task…’

Anyron Copeman / Foundry
- Give your file a meaningful name. In this example, we’re going for ‘Windows auto-lock’
- Under ‘Security options’, make sure the admin account is selected to run the task and decide whether you want it to just run when logged in or not

Anyron Copeman / Foundry
- Choose the ‘Triggers’ tab from the top of the window, then select ‘New’

Anyron Copeman / Foundry
- From the drop-down next to ‘Begin the task’, choose ‘On a schedule’ (unless you’re going for something more complicated)
- As with the basic command, specify a start time and frequency
- Choose any of the advanced settings you’d like, then click ‘OK’

Anyron Copeman / Foundry
- Choose the ‘Actions’ tab from the top of the window, then click ‘New…’
- Make sure ‘Start a program is selected’, then enter your chosen script. To lock the device, it’s ‘rundll32.exe’. For many other commands, choose ‘powershell’
- In the box next to ‘Add arguments’, add the rest of the command you’d usually enter into Windows PowerShell. In this example, it’s ‘user32.dll,LockWorkStation’

Anyron Copeman / Foundry
- Click ‘OK’, then ‘OK’ again to save it