Run STAF as a Windows Service with AlwaysUp

How to Automatically Start STAF as a Windows Service with AlwaysUp

Launch STAF whenever your computer boots, before you log in. Make sure that your Windows testing framework is always available, 24/7/365!

The Software Testing Automation Framework (STAF) is an open source package supporting automated testing across multiple platforms.

STAF can be configured to start when you log in, but that feature won't be much good if you are not there after a reboot. Installing STAF as a Windows Service will address that shortcoming!

To setup STAF as a Windows Service:

  1. Download and install STAF for Windows, if necessary.

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

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

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the STAFProc executable, STAFProc.exe. By default, STAF installs to C:\STAF, so you will likely find it in the bin folder:

      C:\STAF\bin\STAFProc.exe

    • In the Start the application field, select Automatically, but shortly after the computer boots. With this setting, STAF will start 1-2 minutes after a reboot — after critical windows services (such as networking and domain authentication) have fully initialized and are ready to go.

    • In the Name field, enter the name that you will call the application in AlwaysUp. We kept the default of STAFProc but you can specify a more meaningful name if you like.

    STAF Windows Service: General Tab

  6. Click over to the Logon tab. Check the box at the bottom to prevent annoying notifications when STAF runs in the background in Session 0:

    STAF Windows Service: Logon Tab

    Note: This is not necessary for the latest versions of Windows where access to Session 0 has been removed.
  7. We are now done configuring STAF to run as a service so click the Save >> button to record your settings. After a couple of seconds, an entry called STAFProc will appear in the AlwaysUp window.

    The state will be "Stopped" because STAF hasn't been started yet:

    STAF Windows Service: Created

  8. Now that STAF is configured to start at boot, there is no need to launch it again when you login. We recommend using Microsoft's free Autoruns tool to disable STAF's auto-start but any "startup manager" should do the trick.

    With Autoruns, click over to the Logon tab and un-check the box beside the STAFProc.lnk entry:

    Disable STAFProc autostart at login

  9. To start STAF from AlwaysUp, choose Application > Start "STAFProc". The program will start invisibly in the background, on the isolated Session 0.

    Click on the green circle icon to see some details about the running process:

    STAF Windows Service: Running

  10. To verify that STAF is operating properly, bring up a command prompt (started as an administrator) and run:

    staf local ping ping
    Look for a successful PONG response:

    Ping to Check the STAF Windows Service

  11. That's it! Next time your computer boots, STAF will start up immediately, before anyone logs on.

    We encourage you to edit STAF in AlwaysUp and check out the many other settings that may be appropriate for your environment. For example, send email when STAF crashes or stops for any reason, boost the priority of the process, automatically restart the program nightly to cure memory leaks, and much more.



STAF 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 a HTML report detailing the interaction between AlwaysUp and STAF. The AlwaysUp Event Log Messages page explains the messages that may turn up.

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

  • Check the STAF FAQ.

  • Contact us and we will be happy to help!

Download & Try it Free!

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

7.9 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!