Run AutoHotkey as a Windows Service with AlwaysUp

How to Run AutoHotkey as a Windows Service with AlwaysUp

Start your complied AutoHotkey executable as soon as your computer boots and keep it running 24x7 in the background


Last Updated on May 3, 2026

AutoHotkey is a free a scripting language and toolkit for desktop automation.

While Microsoft strongly discourages GUI interaction from a Windows Service, at least one of our customers needed to run an AutoHotkey script in Session 0 to support a legacy application. Here's how we helped her set that up.


To install your AutoHotkey executable as a Windows Service with AlwaysUp:

  1. Download and install AlwaysUp, if necessary.

  2. Start AlwaysUp.

  3. Select Application > Add to open the Add Application window:

    Add Application

  4. On the General tab:

    • In the Application field, enter the full path to your compiled AutoHotkey executable. In this tutorial, we are running the simple text editor with menu bar example, compiled into an executable called AHKSampleTextEditor.exe.

    • In the Name field, enter the name that you will call your application in AlwaysUp. We have used AutoHotkey Executable but you can specify virtually anything you like.

    • If you have any command line parameters for your AutoHotkey executable, enter those in the Arguments field. Our sample takes no parameters so we will leave that section blank in this tutorial.

    AutoHotkey Windows Service: General Tab

  5. Click the Save button to record your settings. In a couple of seconds, an application called AutoHotkey Executable (or whatever you called it) will appear in the AlwaysUp window. It is not yet running though and the state will be "Stopped":

    AutoHotkey Windows Service: Created

  6. To start your exe as a Windows Service, choose Application > Start "AutoHotkey Executable". The state should transition to "Running" momentarily:

    AutoHotkey Windows Service: Running

    Your executable will be running in the background in the isolated Session 0.

    Select Application > Restart "AutoHotkey Executable" in this session to quickly stop your AutoHotkey executable and restart it visibly on your desktop.

    Or setup automatic login to get around Session 0 isolation.

  7. That's it. Next time your computer boots, your AutoHotkey executable will start before anyone logs on.

    As noted before, GUI applications may sometimes run into trouble when run as a windows service. Proceed cautiously and test thoroughly.

    And finally, we encourage you to edit the application in AlwaysUp and check out the many other settings that may be appropriate for your environment.


AutoHotkey not working properly as a Windows Service?

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a Windows Service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and your AutoHotkey application. The AlwaysUp Event Log Messages page explains the more obscure messages.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!

Our 14,000+ customers include...
AlwaysUp is fully compatible with Windows 11 AlwaysUp is fully compatible with Windows Server 2025
Over 97,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 20+ years!