07-01-2013 04:02 AM
I am running devcon with System exec.vi and using the "standard output" to read the response, but the trouble is, it works fine when I run cmd as an administrator manually and I can read the output, but when I run the same command with labview system exec.vi , devcon seems to open another cmd window and runs in it and then close quickly resulting in a blank output. I don't know how to run cmd as an administrator pragmatically.
I would appreciate if someone has an example code of running devcon with system exec.vi and getting a response in the "standard output" to be used to make a decision using labview.
07-01-2013 04:25 AM
wire an indicator to the output of system exec.vi. This will capture the output
Hope it helps
07-01-2013 07:05 AM
Thanks Akiel for your reply, yes I am wiring the output to an indicator but the response is not the same string that I get when I run CMD as administrator manually and then type the command. It responds with "C:\windows\System>More?" instead of the name of the device found in device manager.
07-01-2013 07:13 AM
Have you got system exec.vi set to wait for execution to finish (one of the booleans)?
07-03-2013 03:41 AM
There is an example on the community here:
https://decibel.ni.com/content/docs/DOC-15561
Don't know if you have seen this?
07-03-2013 03:52 AM
Hi, when we try running a command line, which we have already used in CMD (command prompt), one thing we have to make sure:
To use a command that must be executed directly from a command prompt window, insert "cmd /c" before the command.
Taken from LabVIEW help.
07-03-2013 08:40 AM
We used to do something like that to determine if a device was connected, but now we do it without devcon.
See attached VI.
02-10-2017 11:46 AM
did you fix the problem?? How did you do it?