LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a LabView exe file as a Windows Service.

I have created a LabView application that runs fine on its own.  But I wanted to run it as a service.  Using sc.exe I was able to create the service entry into the Windows Service Manager, but every time that I start the service I receive a 1053 error from Windows and the service is shut down.  I do know that the program runs for a short period of time, because I am able to connect to it with a console program. 
 
Any ideas?
 
Thanks
 
Matt
 
 


Message Edited by mlwarren on 12-21-2007 09:43 AM
0 Kudos
Message 1 of 6
(6,028 Views)
Matt,

See the linked Knowledge Base "Running a LabVIEW Application as a Windows NT/2000/XP Service." This should allow you to run your LabVIEW executable as a Windows Service.

http://digital.ni.com/public.nsf/allkb/21BA0F671A63A60386256CB4004DF99B?OpenDocument
Mark
NI App Software R&D
0 Kudos
Message 2 of 6
(6,015 Views)
Mark,
 
I have tried this and my application will work this way.  But I was wanting to place the SCM callbacks into my LabView code.  This way I would not have to have addtional programs installed on my target PC.
 
Matt
0 Kudos
Message 3 of 6
(6,000 Views)
Matt,

After a little bit of searching I found a forum topic that is very similar to yours.

http://forums.ni.com/ni/board/message?board.id=170&message.id=137042&requireLogin=False

Please note the link in the last post.
http://members.cox.net/kuanchen/lvservice/index.html


Let me know if these are helpful.
Mark
NI App Software R&D
0 Kudos
Message 4 of 6
(5,996 Views)

I took a look at http://members.cox.net/kuanchen/lvservice/index.html for creating a Windows NT Service but I dont know how to accomplish step 2.

 

"Link AnyService.dll to the LabVIEW dll created in Step 1"

 

I downloaded Visual C++ 2008 Express Edition to build dll, but how can I do that?

 

Julio Díaz
0 Kudos
Message 5 of 6
(5,432 Views)
Duplicate query in this thread.
0 Kudos
Message 6 of 6
(5,413 Views)