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

Open the Task Scheduler app

Windows 11 automate tasks tutorial steps - 1

Anyron Copeman / Foundry

The easiest way is to search for it via the search bar next to the Start menu. But it’ll also be in any lists of installed apps. Once open, it’ll look like the screenshot above.

Create a new folder

Windows automate tasks tutorial method - 2

Anyron Copeman / Foundry

Right-click ‘Task Scheduler Library’ in the left pane, then choose ‘New Folder…’. Give it a meaningful name and hit enter.

Create new ‘Basic Task’

Windows automate tasks tutorial method - 3

Anyron Copeman / Foundry

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

Give the task a meaningful name

Windows 11 automate tasks tutorial method - 4

Anyron Copeman / Foundry

In the ‘Name’ field, type something of your choosing – in this example, it’s ‘File Explorer launcher’. Then, click ‘Next’.

Choose task frequency

Windows 11 automate tasks tutorial method - 5

Anyron Copeman / Foundry

From the next screen, choose how often you want the task to run. There are seven options, although ‘when a specific event is logged’ requires extra technical knowledge. Once selected, click ‘Next’ again.

Choose a start time and how often it recurs

Windows 11 automate tasks tutorial method - 6

Anyron Copeman / Foundry

Select a specific time and date using the calendar. Then type how often you want it to repeat. In this example, you’d type a ‘1’ here for every day. Once complete, click Next once more.

Make sure ‘Start a program’ is selected

Windows 11 automate tasks tutorial method - 7

Anyron Copeman / Foundry

There are three options here, but sending an email and displaying a message are no longer supported by Microsoft. They may still work, but opening a program is much simpler and does still work.

Select the app you want to open

Windows 11 automate tasks tutorial method - 8

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. There’s no need to add optional fields, so just click ‘Next’.

Review and finish

Windows 11 automate tasks tutorial method - 9

Anyron Copeman / Foundry

Check everything looks right in this summary screen. If you’re satisfied it does, click ‘Finish’.

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.

  1. Follow steps 1-5 as above

  2. Right click your created folder, then choose ‘Create Task…’

Windows 11 automate tasks tutorial method - 10

Anyron Copeman / Foundry

  1. Give your file a meaningful name. In this example, we’re going for ‘Windows auto-lock’

  2. 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

Windows 11 automate tasks tutorial method - 11

Anyron Copeman / Foundry

  1. Choose the ‘Triggers’ tab from the top of the window, then select ‘New’
Windows 11 automate tasks tutorial method - 12

Anyron Copeman / Foundry

  1. From the drop-down next to ‘Begin the task’, choose ‘On a schedule’ (unless you’re going for something more complicated)

  2. As with the basic command, specify a start time and frequency

  3. Choose any of the advanced settings you’d like, then click ‘OK’

Windows 11 automate tasks tutorial method - 13

Anyron Copeman / Foundry

  1. Choose the ‘Actions’ tab from the top of the window, then click ‘New…’

  2. 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’

  3. 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’

Windows 11 automate tasks tutorial method - 14

Anyron Copeman / Foundry

  1. Click ‘OK’, then ‘OK’ again to save it
  • How to make Windows 11 easier to use on tablets
  • How to downgrade from Windows 11 to Windows 10
  • How to fix a laptop that won’t turn on

Author: Anyron Copeman, Mobile Editor, Tech Advisor

How to automate tasks in Windows - 15

Anyron is Mobile Editor at Tech Advisor, where he’s been a mainstay of the editorial team since 2019. In his current role, Anyron is responsible for all smartphone, tablet and mobile network coverage on the site. A BA Journalism graduate, he has experience with a wide range of consumer tech products and services, including smartphones, tablets, foldables, wearables and more.

Recent stories by Anyron Copeman:

  • Windows 11 23H2 update: Everything you need to know
  • Windows 12: Everything we know so far
  • How to get the Google Play Store on Windows 11