How to Schedule AutoHotKey to Start Up with Windows

AutoHotKey is one of the best free applications for Windows for creating quick custom keyboard shortcuts and automating several Windows tasks. With all the custom AutoHotKey scripts you created, you sometimes need to launch a script automatically when you log in to Windows. Here is how you can schedule AutoHotKey to startup with Windows.

There are two ways to make a AutoHotKey script start up with Windows. The first is to add it to the Startup folder, and the other is to create a scheduled task. I will show both ways; follow the one you are most comfortable with.

The easiest way to start a  AutoHotKey script on system startup is to add it to the Startup folder. To do that, press “Win + R,” paste the path shown below and press the Enter button.

%appdata%\Microsoft\Windows\Start Menu\Programs\Startup

schedule-autohotkey-run-command

The above action will open the user specific startup folder.. Right-click on the empty space, select the “New” option and then “Create Shortcut.”

schedule-autohotkey-new-shortcut

In the “Create Shortcut” window click on the “Browse”  button. Select your AutoHotKey script and click “Next” to continue.

schedule-autohotkey-shortcut-location

In this screen enter the name of the shortcut, and click on the “Finish” button to complete the procedure.

schedule-autohotkey-shortcut-name

Your custom startup item has been created. Whenever you start your system and log in, the AutoHotKey script will be automatically launched.

schedule-autohotkey-shortcut-created

Note: if you want the AutoHotKey script to launch regardless of which user is logged in, then create the shortcut in the below folder. It is the Startup folder for all the users on your system.

%programdata%\Microsoft\Windows\Start Menu\Programs\Startup

If you want more control or if you want the script to start up with admin rights, then using the Task Scheduler is the best way to go. To do that search for the Task Scheduler in the start menu and open it.

schedule-autohotkey-search-task-scheduler

Once the Task Scheduler has been opened, click on the option “Create Task” appearing on the right pane.

schedule-autohotkey-create-task

Here in this window under the General tab enter the name of the task, and select the radio button “Run only when user is logged on.” If you want the script to run with admin rights then select the checkbox “Run with highest privileges.”

schedule-autohotkey-task-name

Now, navigate to the Triggers tab and click on the “New” button to add a new trigger. In the “New Trigger” window, select the option “At log on” from the drop-down menu next to “Begin the task,” and make sure that the “Any user” radio button is selected. Click on the “OK”  button to save the changes.

schedule-autohotkey-new-trigger

Once you are done setting up the trigger, this is how it looks in the main window.

schedule-autohotkey-trigger-created

Navigate to the Actions tab, and click on the “New” button appearing at the bottom of the window. In the Actions window click on the “Browse” button, and select the AutoHotKey executable from the “Program Files” folder. After that, enter the path to your AutoHotKey script in the Arguments field, and click on the “OK” button to save the changes.

schedule-autohotkey-add-action

Note: if you enter the AHK script path directly in the “Program or Script” field, Windows might not launch the script at system startup.

After setting up the Action, this is what it looks like.

schedule-autohotkey-action-created

Navigate to the Conditions tab and uncheck the “Start the task only if the computer is on AC power” checkbox. This ensures that the task will start even if you are using your system on battery.

schedule-autohotkey-conditions

Simply click on the “OK” button to save the scheduled task. If you want to test the task, select the task you just created, click on the “Run” option under the “Selected item” and it should start your AHK script.

schedule-autohotkey-run-task

Now whenever you log on to your machine, the AKH script will start automatically.

schedule-autohotkey-ahk-started

Do comment below sharing your thoughts and experiences about using the above method to schedule AutoHotKey script at system startup.

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.