LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my compiled exe ask for the location of subvis when installed on another computer?

Solved!
Go to solution

Hello,

 

I have a piece of deployable software I have developed and so I have created two build specifications to produce an .exe file and an installer.

 

The build specification for the installer includes the compiled exe and all of the required SubVIs to reside in a sub directory in the install directory and when it installs on another computer the SubVIs are located in the correct place.

 

However, when I install and run it on another computer, a dialog box appears prompting for the location of the SubVIs, I select the one that it is asking for and it then loads the remaining VIs and runs as normal.

 

Is there something fundamentally I'm missing in the way SubVIs are called after using an installer, or is there a way to bundle them into the .exe/installer so that I don't receive the dialog box?

 

Many thanks in advance,

Sam


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 1 of 15
(2,927 Views)

Do you launch any VIs dynamically in you application? (like using the "open VI reference" function)?

0 Kudos
Message 2 of 15
(2,922 Views)

If you do:

 

Always include the folder(s) or VI's where the VI's you call dynamically like shown in the picture Smiley HappyUten navn.PNG

0 Kudos
Message 3 of 15
(2,916 Views)

I call SubVIs in my application (e.g. to open up other front panels, or SubVIs within my main front panel etc.)

 

I have checked the 'source files' on my executable build distribution (which is then included in the installer distribution) and it includes the necessary folders containing the SubVIs in the 'always included' section. Like I said - the SubVIs *are* installed along with the installation of the .exe.

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 15
(2,905 Views)

Do the Exe work flawlessly on your computer? There's a classic problem where development system uses different paths from .exe which could cause this.

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 15
(2,897 Views)

Yes - but on my computer, I believe the exe is finding the files from the .exe build, rather than the installer location.

 

In fact, I just renamed the default build directory (where it places the installer / exe after the build and I get the same dialog - it is looking in C:\LabVIEW Builds\etc.

 

rather than...

 

C:\Program Files\My Software\subvidirectory

 

So maybe it is the problem you suggested Yamaeda? If so - is there a solution/workaround for this?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 15
(2,895 Views)

What happens is that the .exe is considered a folder of it's own from sub vi's point of view.

If this is what happens to you you can use the App.kind-property to correct the paths between development system and run-time. You need to remove 1 level of folders if using a path relative to the main vi, easily done with Strip Path.

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 15
(2,893 Views)

So as I understand I need to use the App.kind property wired to a case structure and if it's the run-time I need to do what? Set another property to be the directory above the current location? Should it be the default data directory or the directory path? 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 15
(2,888 Views)

@sam Sharp wrote:

So as I understand I need to use the App.kind property wired to a case structure and if it's the run-time I need to do what? Set another property to be the directory above the current location? Should it be the default data directory or the directory path? 



If It's Run time you need to correct paths with an extra Strip path to get the correct one. That goes for all vi paths that are dynamically loaded.

 

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 15
(2,879 Views)

I'm not sure I'm clear on what you mean by 'dynamically loaded' - all of the SubVIs are called from the block diagram in my VIs. Is that dynamic or static calling?

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 10 of 15
(2,873 Views)