Running ThermoHID as a Service

The Windows NT/2000 Resource Kit provides two utilities that allow you to create a Windows user-defined service for Windows applications and some 16-bit applications (but not for batch files).

Whats needed for Windows NT/2000:
Instrsrv.exe installs and removes system services from Windows NT/2000/7
Srvany.exe allows any Windows application to run as a service.
You can download both files here

This zip includes three files. The two you need srvany.exe and instsrv.exe to install the services and also srvany.wri which documents everything you can do with the program.
Note: Make sure the Services Manager is closed while running the DOS commands.

You will need to put these files in a directory called reskit At a MS-DOS command prompt(Start | Run | "cmd.exe"), type the following command:
<path>\reskit\INSTSRV.EXE "ThermoHID Logger" <path>\reskit\SRVANY.EXE

Note for Windows7 users:
Type cmd in the search dialog. Instead of hitting the Enter key, use Ctrl+Shift + Enter. You will be prompted with the obnoxious User Account Control dialog… but it will then open up a command prompt in Administrator mode.

Alternatively, in order to run cmd.exe as a administrator do following:
right click on command prompt icon and click on Run as administrator

This creates the service in the Services manager and the registry keys to setup what program to run.

Next open regedit.exe Start | run | regedit.exe
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

Next navigate to this registry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ThermoHID Logger

From the Edit menu, click Add Key and name it Parameters
Next from the Edit menu, click Add Value and type this information.
Value Name: Application
Data Type : REG_SZ
String : <path>\<ThermoHID.exe>

Now you can start your service from the Service Manager Start | run | services

You could run the service as a separate user if required.

HINT: If you see a brief screen flash when the program uploads updated readings/charts, you can eliminate this by having the service run as another Windows user, rather than the System account.
You may need to create a new user account, if one doesn’t exist.
For example, here we created a new user named john and now run the service using the john account.

With this same program you can remove the service also. Just run this command from command prompt.
<path>\reskit\INSTSRV.EXE "ThermoHID Logger" REMOVE

Back to main page

Many thanks to John Chamberlain for providing me with these instructions