Home » Insider Builds » How to Run AutoHotKey Script on Startup in Windows 10 & 11

How to Run AutoHotKey Script on Startup in Windows 10 & 11

With a simple trick, you can run an AutoHotKey script on startup in Windows. It is pretty easy to do.

AutoHotKey is one of my favorite software. In fact, I use it daily and have a fair number of custom shortcuts, macros, and text expansions that make my Windows experience that much more pleasant. The best thing is that, depending on your use case, creating an AutoHotKey script is easy and fast.

To get the most out of an AutoHotKey script, running it on startup is essential. That way, the script runs automatically and gives you instant access from the get-go.

There are two ways to run an AutoHotKey script on startup in Windows. The first method is quite easy to follow, and the second is useful if you want more control over how and when the AutoHotKey script runs on startup.

Table of contents:

  1. Add AutoHotKey script to the startup folder
  2. Schedule AutoHotKey script with Task Scheduler

Note: I assume that you already have an AutoHotKey script ready.

The steps below work the same in Windows 10 and 11.

Add AutoHotKey script to the startup folder

You can add the AutoHotKey script shortcut to the Windows Startup folder to run it on system startup. In fact, you can add any application shortcut to this folder to run it on startup. Let me show you how.

  1. Open the File Explorer.
  2. Go to the folder where the script is saved.
  3. Right-click on the AutoHotKey script.
  4. Choose the “Send to -> Desktop” option.
  5. It will create a shortcut for the script on the desktop.
  6. Go to the desktop and copy the shortcut.
  7. Press “Win + R” to open Run.
  8. Type “shell:startup” in the blank field.
  9. Press “Ok.”
  10. Paste the copied AutoHotKey script shortcut.
  11. Close File Explorer.
  12. With that, the AutoHotKey script now runs on startup in Windows.

Steps with more details:

First, we can only add shortcuts to the startup folder; we need to create a shortcut for the AutoHotKey script. To do that, open the File Explorer with the “Win + E” shortcut and go to where the AutoHotKey script is saved. Next, select the AutoHotKey script, hold the “Alt” key on your keyboard, and drag and drop it into the same folder.

The above action will instantly create a shortcut of the script file in the same folder. It is optional, but you can remove the “.ahk – shortcut” suffix from the shortcut name.

Note: You can also create a shortcut by right-clicking the script file and selecting the “Send to -> Desktop” option. The shortcut will be created on the desktop.

create AutoHotKey script file shortcut

After creating the shortcut, copy it. You can select the shortcut file and press the “Ctrl + C” shortcut. We are going to paste it into the startup folder.

Now, we need to open the Startup folder. So, press the “Win + R” to open the Run dialog box. Type the shell command shell:startup in the blank field and click the “Ok” button.

open startup folder

The run dialog box immediately opens the Windows Startup folder. Press the “Ctrl + V” shortcut to paste the copied shortcut file in the Startup folder. You can also drag and drop the shortcut file into the startup folder.

add AutoHotKey script shortcut to startup to run AutoHotKey on startup

That is all. From now on, the AutoHotKey script will automatically start with Windows. You no longer have to launch the script manually.

Schedule AutoHotKey script with Task Scheduler

You can use the Task Scheduler if you want more control over how a program starts with Windows. For example, this method is useful to delay start a program. Let me show you how to schedule and run an AutoHotKey script on startup in Windows.

  1. Press the “Start” key.
  2. Search and open “Task Scheduler.”
  3. Click “Create Basic Task.”
  4. Type a name in the “Name” field.
  5. Click “Next.”
  6. Select “When I log on.”
  7. Press “Next.”
  8. Choose “Start a program.”
  9. Click “Next.”
  10. Type the below path in the “Program/Script” field.
    "C:\Program Files\AutoHotkey\AutoHotkey.exe"
  11. Type the AHK script file path in the “Arguments” field.
  12. Press the “Finish” button.
  13. Close the Task Scheduler.
  14. With that, you’ve scheduled an AutoHotKey script to run on startup.

Steps with more details:

First, open the start menu, search for “Task Scheduler,” and click on the result to open it.

After opening the Task Scheduler, select the “Create Basic Task” option on the right sidebar.

click create basic task

Give the new task a name using the “Name” field and press the “Next” button to continue.

name the task

Since we want to run the AutoHotKey script on startup, select the “When I log on” radio option and click “Next.”

select when I log on

Select the “Start a program” radio option and press “Next.”

select start a program

Type the following file path in the “Program/script” field. After that, enter the AutoHotKey script file (.ahk) path in the “Arguments” field. Press the “Next” button.

Note: If you’ve installed AutoHotKey in another location, modify the path below accordingly. You can also click the “Browse” button next to the “Program/script” field and select the “AutoHotKey.exe” file.

"C:\Program Files\AutoHotkey\AutoHotkey.exe"
type program and script path

Review your settings and click the “Finish” button to complete the task creation process.

task created

Finally, find the newly created task in the main window, right-click, select “Run,” and see if the job runs successfully. If it did not run as expected, review the steps.

run AutoHotKey script on startup in Windows using task scheduler

That is all. From now on, the AutoHotKey script will run on startup in Windows.

Wrapping Up

As you can see, running an AutoHotKey script at Windows startup is pretty easy.

I hope this simple and easy Windows how-to guide helped you.

If you are stuck or need help, send an email, and I will try to help as much as possible.

If you like this article, check out how to create a right-hand alt-tab shortcut and how to run portable apps at system startup.

1 thought on “How to Run AutoHotKey Script on Startup in Windows 10 & 11”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top