LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System Exec VI fails after compiled into .exe

Solved!
Go to solution

Hello all, I have created a simple vi that will run notepad and open a .txt file. It also runs an executable that uploads the data from the .txt file to a database. It works fine on the development machine in both ide mode and as an executable. I install the build onto another computer and once installed, proceed to run the executable and the vi runs but it seems the command prompt never gets called.

 

I can open the command prompt and run the commands and they work just fine.

 

C:\Windows\System32\notepad.exe

cmd /c C:\specsheetsConsole\build\exe.win-amd64-3.6\labviewdbupload.exe

 

Is there any ideas that could help with this issue?

0 Kudos
Message 1 of 4
(2,218 Views)

Well, what's the difference between the computers (OS version, etc.)?

 

Does it work better if you run the exe with admin privileges (right-click... run as administrator)?

0 Kudos
Message 2 of 4
(2,201 Views)
Solution
Accepted by topic author R18007

Set the Working directory of System Exec to the called .exe's folder.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,142 Views)

Thank you Yamaeda. I had hard coded the "Working directory" variable in the sub vi then used the sub for another call.

0 Kudos
Message 4 of 4
(2,128 Views)