Computer >> Computer tutorials >  >> Networking >> Networking

How to automate tasks in Windows

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

At a glance
  • Time to complete: 5 minutes
  • Tools required: A Windows device and app you’d like to open automatically
1.

Open the Task Scheduler app

How to automate tasks in Windows

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.

2.

Create a new folder

How to automate tasks in Windows

Anyron Copeman / Foundry

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

3.

Create new ‘Basic Task’

How to automate tasks in Windows

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

4.

Give the task a meaningful name

How to automate tasks in Windows

Anyron Copeman / Foundry

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

5.

Choose task frequency

How to automate tasks in Windows

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.

6.

Choose a start time and how often it recurs

How to automate tasks in Windows

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.

7.

Make sure ‘Start a program’ is selected

How to automate tasks in Windows

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.

8.

Select the app you want to open

How to automate tasks in Windows

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

9.

Review and finish

How to automate tasks in Windows

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 
  1. Right click your created folder, then choose ‘Create Task…’
How to automate tasks in Windows

Anyron Copeman / Foundry

  1. Give your file a meaningful name. In this example, we’re going for ‘Windows auto-lock’ 
  1. 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 
How to automate tasks in Windows

Anyron Copeman / Foundry

  1. Choose the ‘Triggers’ tab from the top of the window, then select ‘New’
How to automate tasks in Windows

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)
  1. As with the basic command, specify a start time and frequency 
  1. Choose any of the advanced settings you’d like, then click ‘OK’
How to automate tasks in Windows

Anyron Copeman / Foundry

  1. Choose the ‘Actions’ tab from the top of the window, then click ‘New…’ 
  1. 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’ 
  1. 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’ 
How to automate tasks in Windows

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