
A batch file is script native to windows that executes a series of commands.
A Batch File can be run as a Windows service using FireDaemon Pro. This allows you to start and run the script automatically when Windows boots and before login. FireDaemon Pro also allows you to start multiple instances of the script, monitoring them and automatically restarting those instances in the event they crash. FireDaemon Fusion can also be used to manage your Batch File service, plus other Windows services via your web browser.
Batch File Setup Under FireDaemon Pro
Step 1: Get or create your batch file
- First, create your batch file. For the purposes of this guide we will run a batch file with the following, which will open Notepad. We will save this as Notepad.bat. Be sure not to save the file as Notepad.bat.txt, or the batch will not run!
C:
CD \Windows
.\notepad.exe - Create a folder to store your Batch File. For the purposes of this guide, we will use "C:\Batch Files".
Step 2: Set Up Batch File as a FireDaemon Pro Service
Download and install FireDaemon Pro. Double click the FireDaemon Pro icon on your desktop, then click on the New (i.e. +) button in the toolbar (or type Ctrl + N) to create a new service.:
Next, click on the FireDaemon Pro Settings tab:
Enter appropriate values in the fields on the Settings tab as follows:
- (Required) Job Type: You must set the job type to "Global Job".
- (Optional) Logon Account: Enter the Windows account under which the batch script is to be run, e.g. the current user account.
- Password / Confirm Password: Enter the logon account's password twice.
- (Optional) Interact with Desktop: Interact with Desktop: If this setting is enabled (default), the batch scripts' output messages can be seen in the console window on Windows Session 0. To switch to Session 0, it may be necessary to install FireDaemon Zero and ZeroInput. Alternatively, this setting may be disabled, in which case the batch script's messages will be hidden.
- (Optional) Priority: To allocate more CPU time to the batch script, select a higher scheduling priority in this field.
- (Optional) CPU Bindings: To run the batch script on a specific CPU, specify the appropriate CPU in this field.
Step 6: Verify that Batch file is Running Correctly
The Batch file's status can easily be checked on the main FireDaemon Pro Services List - look for a Running Status value and a numeric Process ID (PID) value.