LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

work path problem

Work path problem

If i try to open an exe-file, by the system execute.vi, so it is no problem, if i add the path where this exe is located. But if this exe-file (called by the system execute.vi) calls another bin-, or dll-file there is a problem because, my exe-file uses the windows work path to call the binary-file.

So you could put all the file in one directory and there is no problem if you start your vi by the normal windows explorer with a double klick. That causes that the windows work path would be set to the current directory.

If you start your vi from the labview (file -> open) the windows work path would not be set to this directory and the called exe uses a wrong path to call the binary-file.

Is there a possibility to set the wind
ows work path in labview manually? I figured out, that the Windows work path und the work path from labview are not the same.

If i create an executable there is no problem with the work path too, because if i call the exe the windows work path would be set to this directory and my files are all in the same directory.
0 Kudos
Message 1 of 5
(3,048 Views)
System Exec.vi has an input for specify a working directory. Does this not work? I have never had to use this input myself, but it sounds like it would do what you need.

Mike..

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,048 Views)
yes tehre is a connection to specify the working directory.
it seems so, that this is only a working directory for labview and not a global windows working directory.
my exe trys to call the bin via the windows working directory...
0 Kudos
Message 3 of 5
(3,048 Views)
I ran a test where I instructed notepad to open a file (notepad.exe readme.txt) with and without the working directory. Without it, notepad wanted to create a new file, but with the working directory (a non LabVIEW directory), the file opened like it should.

Jeremy
0 Kudos
Message 4 of 5
(3,048 Views)
54577533trh wrote:
> yes tehre is a connection to specify the working directory.
> it seems so, that this is only a working directory for labview and not
> a global windows working directory.
> my exe trys to call the bin via the windows working directory...


If you've control of your exe file, you might want to let your exe
call a shortcut instead of the bin. While making the shortcut, you can
specify the working directory.

Otherwise, you might try G Toolbox ($). It has a vi can set the working
dir.

http://gtoolbox.yeah.net
0 Kudos
Message 5 of 5
(3,048 Views)