LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EXE programs - how to include config files

I am compiling an EXE version of my labview instrument control program, and I want to include several config files in the compile so my exe program becomes transportable to another computer without having to also transport the config files referenced. I was hoping to reference then via  a path "relative to current VI's path", but this doesnt seem to work.
Can anyone suggest how this should be done - what path my program should refer to these files through.
Fred
0 Kudos
Message 1 of 4
(4,693 Views)
Hello,

Let's divide this post in two:

1 - add the config files (like .txt, .ini)
I think that you can't do that only with the .exe. In order to have a portable application it's necessary to create an installer that will install at least the labview runtime. And here in the installer creation you can add your config files;

2 -call other files using current vi path.
Well, do you know that when you use that "current vi path" you have two different behaviors in executable and .vi. Let me give you an example:

  vi: path\name_of_vi.vi
  exe: path\name_of_vi.vi.name_exe
I'm not quite sure about the path in executable. But you have to take it off the last part.

But take a look in Darren's nugget for this topic:
http://forums.ni.com/ni/board/message?board.id=170&message.id=164048#M164048
Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 4
(4,689 Views)
Hi Fred,

you have to use one more level of 'get path' when the vi is in an executable or an llb-file! Using the vi in the development environment you have the path c:\mypath\my.vi but in the executable you get c:\mypath\my.exe\my.vi!
So check for executable and strip one more directory to get the correct path!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 4
(4,687 Views)
thanks. I wil try those things
0 Kudos
Message 4 of 4
(4,660 Views)