Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run VisionBuilder as a service in Windows

Solved!
Go to solution

I've got VBAI running on the System Administrator account on a server, but some "Administrators" are prone to "Logging Off" rather than disconnecting, thereby killing VBAI.  I have a scheduled task that restarts VBAI if somone restarts the server, in this case VBAI comes up headless (no UI), but it processes just fine, I'm not sure if it's running as a service or "as Administrator," but it works for server restarts. 

 

But I still need a way to keep running VBAI even if the System Administrator logs off, i.e., running VBAI as a service, and prefereably without restarting the server, I'm told it can be done, but how?

 

Eric

0 Kudos
Message 1 of 3
(3,097 Views)
Solution
Accepted by topic author eberg

Hi eberg,

 

First off, I assume we are using Windows Server. If this is the case, running VBAI as a service should be the same as running any other application. There are a number of tutorials out there regarding this. This link seems to be well done, but there are numerous others out there for creating a service from an application. I have not tried any of the steps, since we do not have a server to test, but it should be like any other application.

------------------------------
Bill E. | Applications Engineer | National Instruments
0 Kudos
Message 2 of 3
(3,084 Views)

@Ever_Song wrote:

Hi eberg,

 

First off, I assume we are using Windows Server. If this is the case, running VBAI as a service should be the same as running any other application. There are a number of tutorials out there regarding this. This link seems to be well done, but there are numerous others out there for creating a service from an application. I have not tried any of the steps, since we do not have a server to test, but it should be like any other application.


 

 

I found good info at the cited link, but while the info at the link will have you believe that you can't use SrvAny with Windows Server 2008...suggesting that you buy a third party solution instead, the fact is that SrvAny will work just fine; moreover, even Microsoft will want to charge you for SrvAny by making you by the Server 2008 utilities pack, but that's not necessary.  The SrvAny from the Windows XP 2004 Utilities pack (free) works just fine.  We had to hunt around a bit for the information to make it work but we finally got it. 

 

Bottom line, there are two ways to achieve the desired result of having VBAI running "as a service"  one is to use the Task Manager and trigger a task on Server restart to run VBAI...it shows up running as a Process, and it keeps running even if the user logs off.   The second way is to use SrvAny and run it as a service.  The latter mode has the added advantage that you can stop and start the service (Pause/Resume have no effect) without re-starting the server.  In both cased, VBAI comes up running headless, hence the need to stop the service and run VBAI as a standard application from time to time....but I always switch back to running as a service when I'm done (the service is also configured for Automatic restart) to prevent others from shutting down VBAI but inadvertently logging off the account that VBAI is running on.

 

Eric

 

Message 3 of 3
(3,034 Views)