System & network administration  

Running VNCCSL.EXE as a NT Service

This tip is only available for Windows NT. Basically there's no way to do it directly, because VNCCSL.EXE is just a command line tool and nothing else, but you can manage to do it if you download and install FireDaemon (there's a lite version available). Simply download and install FireDaemon on your computer, copy or download the batch code available here, don't forget to change the set commands at the beginning of the script. 

Once you are satisfied that your script is doing what you want and generating the appropriate output you need to set it up as a service with FireDaemon. This is what I did:

cd \progra~1\firedaemon
firedaemon -p (or firedaemonui if it is installed)        

Now answer the FireDaemon questions exactly as follows (your paths might differ depending on where you installed the batch script):

Service Name --> vncsearch
Application Working Directory --> c:\yourpath
Application Executable --> c:\yourpath\search.bat
Application Options -->
Auto Restart Application --> y
Processor Affinity Mask --> 0
Process Priority --> 0
Interact With Desktop --> n
Auto Start Service --> y        

If you want to be really smart you can run multiple instances of that script on the same machine. Just ensure that you change the service name (vncsearch1, vncsearch2, etc.). Finally, start the service:

net start vncsearch        

Check that the service has been started correctly by examining your process list in the Task Manager and that the script output are being updated (point your explorer at your output folder location). You can also check the NT/2K event log for FireDaemon events and errors.

© 1998-2006