02-21-2016 04:51 AM
Hello,
How do I create a Windows services that meet the Windows requirements (start, stop, restart, suspend)?
Besides not having a front panel and did not need user interaction, service must be able to communicate with the OS. It must receive commands such as start, stop, restart, suspend.
How can you build such a VI?
Must the application (.exe file) be able to load the command line arguments (eg "c:\<app_path>\app_name.exe arg1 arg2")?
BR
02-21-2016 07:50 AM - edited 02-21-2016 07:53 AM
These may answer your questions, or at least partly:
http://digital.ni.com/public.nsf/allkb/4A8B626B55B96C248625796000569FA9
http://digital.ni.com/public.nsf/allkb/17C3AD70493CE0208625666A00763364
02-21-2016 01:37 PM
Very useful links!
By the way, the "app.ini file" may contain many interesting tokens. Where there is documentation for these tokens?
Passing through the command line arguments, I used it in the past and is doing great.
I tried to turn the .exe file in a Windows service by using Sc.exe. Service appears in Task Manager having Stopped status and if I try to start it manually, I get an error "Unable to Start Service". So it looks like .exe file must meet certain characteristics to be a service.
BR