How To Start & Run Any Batch File (*.BAT) As A Windows Service With AlwaysUp

Kick off your batch file when your PC boots. Automatically restart it when it stops.

To set up a batch file to run 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:

  1. On the General tab:
  • In the Application field, enter the full path to the batch file. We have chosen our sample batch file, C:\BatchFile\RunNotepad.bat, which contains the following instructions (to launch the Notepad application):

C: CD \Windows .\notepad.exe

  • In the Name field, enter the name that you will call the batch file application in AlwaysUp. We have used My Batch File but you can specify virtually anything you like.

  1. If your batch file calls a program that needs access to its registry settings, etc., then you will want to click over to the LogOn tab and enter the user name and password of the account that can run the software normally.

  1. Click the Save button. In a couple of seconds, an application called My Batch File will show up in the AlwaysUp window. It is not yet running though.

  1. To start the batch file, choose Application > Start “My Batch File” .

The batch file is currently running in Session 0. On Windows XP and Server 2003, we can see it by logging on to that session. On Windows 8/7/Vista and Server 2012/2008, we can see it if we go to the isolated Session 0 by selecting Tools > Switch to Session 0 :

  1. That’s it! Next time your computer boots, the batch file will be launched immediately, before anyone logs on. We encourage you to explore the many other settings that may be appropriate for your environment.

Batch file 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. (Source: coretechnologies)

Happy learning!