LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Version Information

I need to reed the version that I released a library, does anyone know how I can read the version of the exe or packed library programatically?

ludosava95_1-1616191502711.png

 

0 Kudos
Message 1 of 7
(1,238 Views)

Screenshot 2021-03-19 161220.png

 

MGI has some really nice stuff in their tools package. Get executable version is specifically from the "MGI Application Control" package. Fire up VI Package manager and install that or MGI Tools.

0 Kudos
Message 2 of 7
(1,231 Views)

Version of the exe can be read with vi.lib\Platform\fileVersionInfo.llb.

Lucian
CLA
0 Kudos
Message 3 of 7
(1,222 Views)

For just a library you don't need MGI.  Just an invoke node and a property node:

 

Kyle97330_0-1616192481404.png

 

The first invoke node there is pretty easy to make.  If you just drop down a default invoke node, either from the "Application control" palette or using quickdrop, it's already on "App", and you just select "Library ► Open" and you're there.

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

@Kyle97330 wrote:

For just a library you don't need MGI.  Just an invoke node and a property node:

 

Kyle97330_0-1616192481404.png

 

The first invoke node there is pretty easy to make.  If you just drop down a default invoke node, either from the "Application control" palette or using quickdrop, it's already on "App", and you just select "Library ► Open" and you're there.


This only works for Windows. For other platforms the version is nowhere stored by the application builder.

Also you should make sure the close the refnum returned by Library.Open. Each open refnum uses up some memory and also will keep the library loaded in memory.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 7
(1,127 Views)

Following the solution that was recommended to me, when reading the version information what I always read is a fixed number, I clean the reference in case the library stayed in memory but still read the same number, even when I change the version when packing the bookshop.I don't know if I have to do any settings for this to work.

LDSaldo04_0-1616432654224.png

LDSaldo04_1-1616432693854.png


I have this possible solution at the time of packaging the library, I have to generate the text file and read the version with which it is generated by converting to an ini file and reading the section Output File Version.

LDSaldo04_3-1616433034831.png

 

 

0 Kudos
Message 6 of 7
(1,073 Views)

If you want to build cRIO PPLs, those won't have the nice "Product Version" that you can see in Windows Explorer for Windows PPLs either...

 

I just add a VI at build time that contains a version string as a constant - then I can iterate over PPLs in my project and call that VI in each to produce nice lists:

 

cbutcher_0-1616511782485.png

 

Get-Version-Template.viGet-Version-Template.vi

 

 

Create Version VI Icon.viCreate Version VI Icon.vi

Script Version VI.viScript Version VI.vi

 

 


GCentral
Message 7 of 7
(1,032 Views)