Run any AutoIt Script as a Windows Service with AlwaysUp

How to Run any AutoIt Script as a Windows Service with AlwaysUp

Launch your AutoIt automation in the background when your PC boots, before you log in. Keep it running 24/7 or schedule it to restart several times a day

AutoIt is a powerful scripting language and set of utilities for automating the Windows GUI.

To run your AutoIt script (*.AU3) as a Windows Service with AlwaysUp:

  1. Download and install AutoIt if you haven't already done so.

  2. Please ensure that your AutoIt script (*.AU3) runs normally when executed from your desktop. If your script doesn't work here then it won't run as a windows service with AlwaysUp!

  3. Next, download and install AlwaysUp, if necessary.

  4. Start AlwaysUp.

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

    Add Application

  6. On the General tab:

    • In the Application field, enter the full path to the AutoIt executable (AutoIt3.exe). If you installed AutoIt in the default location, this will be:

      C:\Program Files\AutoIt3\AutoIt3.exe
      or
      C:\Program Files (x86)\AutoIt3\AutoIt3.exe
      if you are on a 64-bit system with the 32-bit tools installed.

    • In the Arguments field, enter the full path to your AutoIt script. We want to run our sample script, C:\Utilities\my-autoit-script.au3.

    • In the Name field, enter the name that you will call this application in AlwaysUp. We have used My AutoIt Script but you can specify virtually anything you like.

    AutoIt Script Windows Service: General Tab

    Note: Instead of running the AutoIt compilation engine each time, you may want to consider compiling your script to a standalone executable. The resulting .exe file can be run on any PC, even those without AutoIt installed. If you compile to an executable, simply enter the full path to the executable in the Application field and leave the Arguments field blank.

  7. Click over to the Logon tab and enter the user name and password of the account in which you installed and configured AutoIt. Your script must run in this account so that AutoIt can find its configuration & settings.

    AutoIt Script Windows Service: Logon Tab

  8. By default, AlwaysUp will run your script all the time, restarting it immediately after it stops. To run your script periodically, click over to the Restart tab and choose when to run. For example, we would like to kick off our script every 3 hours, so we have checked the Not immediately and After boxes and entered 3 hours in the associated field.

    AutoIt Script Windows Service: Restart Tab

  9. We are now done setting up your windows service so click the Save button to record your settings. In a couple of seconds, an application called My AutoIt Script will show up in the AlwaysUp window. It is not yet running though and the state will be Stopped.

    AutoIt Script Windows Service: Created

  10. To start the service, which will kick off the AutoIt script, choose Application > Start "My AutoIt Script". In a few seconds, the state should transition to Running (or Waiting, if your script executes quickly and needs to be restarted after a while).

    AutoIt Script Windows Service: Running

    On Windows 8/7/Vista and Server 2012/2008, your AutoIt script will be running in the background on the isolated Session 0. You can select Tools > Switch to Session 0 to move to Session 0 and interact with the desktop hosting your script.

    If you wish to completely hide the UI created by your script (and prevent the annoying notifications from the "Interactive Services Detection" window), edit your application in AlwaysUp, switch over to the Logon tab (pictured in step 7) and check the When a user logs on, don't show the application's windows... box at the bottom.

  11. That's it! Next time your computer boots, your AutoIt script be started immediately, before anyone logs on. We encourage you to explore the many other AlwaysUp settings that may be appropriate for your environment. For example, boost priority, send regular reports by email and much more.



AutoIt script not working properly as a Windows Service?

  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and your application. The AlwaysUp Event Log Messages page explains the more obscure messages.
  • Consult the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.5 New!

8.0 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!