10-20-2008 09:19 AM
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.
10-20-2008 10:10 AM
Enclose the path in quotes.
I'm assuming you're using the System Exec function to execute the net command?
10-20-2008 10:27 AM - edited 10-20-2008 10:30 AM
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
10-20-2008 11:59 AM
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
10-20-2008 12:25 PM
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.