LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i use labview to start a service

i need to start a service using labview.

 

i normally use the net start command to start the service from a dos window provided the sys file is in the path it will start

 

this time the directory may not be in the path. is there any way to start a service in labview from the following location and not have the directory in the path??

 

C:\Program Files\myapp\data\giveio.sys

 

the net command doesn't seem to like the spaces in the path.

0 Kudos
Message 1 of 5
(3,068 Views)

Enclose the path in quotes.

 

I'm assuming you're using the System Exec function to execute the net command?

0 Kudos
Message 2 of 5
(3,060 Views)

yes i am tring to use system exec 

 

i send this command and i get 

 

 

 cmd /c net start "C:\Program Files\myapp\data\giveio"

 

 

System error 123 has occurred.

The filename, directory name, or volume label syntax is incorrect.

 

 

i tried adding the .sys extension it just doesn't seem to work

 

i beleive its the net command itself that doesn't like the full path possibly

 

 

 

 

 

 

 

 

 

Message Edited by tomsch on 10-20-2008 10:30 AM
0 Kudos
Message 3 of 5
(3,051 Views)

Hi tomsch.  Have you tried passing the name of the service, rather than the path to the exe?

 

We pass the string

 

net start "national instruments variable engine"

 

to the system exec.vi and it works just as expected.

 

Matt

0 Kudos
Message 4 of 5
(3,030 Views)

if i move the giveio.sys file to the C:\windows, C:\windows\system32, C:\windows\system32\drivers, thats all i tried it will work as you stated.

 

if i could get the labview installer to put the giveio.sys file in one of those locations i would concider my problem solved.

 

 

0 Kudos
Message 5 of 5
(3,026 Views)