02-07-2018 01:24 PM
Hi,
I recently created an executable program that call my two setech cameras (name sentech-test.exe) and take multiple pictures. For simplicity, in Power Shell, I run the program by the command: cd C:/sentech-test.exe0 (0 and 1 basically specify which camera I am using). I try to call the program via Labview using System Exec.vi by using the command: cmd\C dir C:\sentech-test.exe0 but the program was not executed. The command window turn on and off very quickly. Do you know how to fix this problem?
Also I am using window 10 computer
Toan
02-07-2018 02:11 PM
Hello Tom,
Quick question: Are you running LabVIEW with administrator privileges?
Have you checked this Knowledge Base article: How Do I Run an Executable or External File from within LabVIEW?
02-07-2018 02:59 PM - edited 02-07-2018 03:07 PM
Hi
I am not running LabVIEW with administrator privileges. Also thank you for the document link. I think it is right on my problem. Do you by chance how to create the .bat file to execute the .exe?
02-07-2018 03:09 PM
02-07-2018 03:32 PM - edited 02-07-2018 03:34 PM
Hello,
Thank you for the document about batch file. It is reaIly helpful. I was able to create the batch file. I tested the batch file and it run just file (it open the camera and take picture). However, when I try to call the batch file via labview using the command: cmd /c dir C:\Users\toanle\Documents\sentech-test.bat but the batch file was not executed. do you have any suggestion on how to resolve this
02-07-2018 04:18 PM
You don't actually have "dir" in that command do you?
02-07-2018 04:27 PM
Hi,
I try to run both with dir and without dir. it still did not execute
02-07-2018 04:32 PM
Hi,
I am not sure of the right syntaxis for calling options in the batch file, but I will like to know if you are doing it like this:
C:\sentech-test.exe0
or
C:\sentech-test.exe -0
I am not sure if this would matter.
02-07-2018 04:39 PM
Hi,
I used sentech-test.exe 0. I am pretty sure that is the correct syntax since if I try to use sentech-test.exe-0, the batch file will not run. You mentioned before about running labView with administrator privileges. Would it be matter? how can I do it?
02-07-2018 04:44 PM - edited 02-07-2018 04:45 PM
Also, I am kind of confused. If I specify my path in the command, I dont have to list anything in the working directory right?