Example Code

Convert LabVIEW application into Windows Service

Code and Documents

Attachment

You can convert any application (executable .exe) into windows service using the methods mentioned in http://digital.ni.com/public.nsf/allkb/21BA0F671A63A60386256CB4004DF99B .  And,Sappster has done a good job of using Microsft Resource Toolkit to achieve it in http://decibel.ni.com/content/docs/DOC-4741

In some cases you would find it's hard to install Microsoft Resource Toolkit (example of where you don't have proper windows authentication to install toolkit).  So do I.  Also, I needed more than just installing the service  i.e., START service, STOP service and REMOVE service.  Hence I have created a wrapper of modified Sappster's work to achieve such needs.  The VI in the attached zip file here makes use of only two executables from resource toolkit (instsrv.exe and srvany.exe) to convert any executable into windows service and enables to do

  1. Install any executable as windows service.
  2. Start the windows service
  3. Stop the windows service
  4. Remove the windows service which you installed
--
Ajay MV


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors