LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract build version number of EXE

So when I build an application in LV Project, I can enter a version number of the build.  How do I get that build number from within the program?  I’d like to check that build number against the latest to make sure the newest version of the program is running. 

 

I tried the App.Version property but it only returns 8.0, presumably the Labview version rather than my application version.  Am I missing something basic or did NI?

 

Thanks,

Doug

Doug Asselbergs
Certified LabVIEW Developer
0 Kudos
Message 1 of 8
(8,209 Views)
Good question.  I looked in the registry and found the version number so I guess you could query that if you know the registry keys.  It would be nice if the App Builder had a function to check for other installed versions and respond accordingly.  I'm using LV7.1 and don't see any way to do this.  You can run executables after install but not do checks before.  Maybe in LV8???
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 8
(8,194 Views)

It certainly seems like Labview should be able to query the version number of it’s own built applications. Maybe Labview 8.1 will fix the oversight.

 

I figured out a way around it if you have the .net framework installed.  In .net there’s a system.diagnostics, which has a method FileVersionInfo that’ll extract the file version (and more) out of any file.  This’ll probably only work with Labview 8 since it seems that previous versions didn’t add the version info to the EXE it built.

 

 

Since the “Current VI’s path” function returns the VI running inside the EXE, you have to strip the path to get the EXE name so you’d have to check App.Kind if you’re in the Run Time System so it doesn’t bomb in the development system.
 
Doug
Doug Asselbergs
Certified LabVIEW Developer
0 Kudos
Message 3 of 8
(8,181 Views)
Sorry the picture of the block diagram didn't display like I thought it would so I'm attaching the vi instead.
Doug Asselbergs
Certified LabVIEW Developer
Message 4 of 8
(8,166 Views)
This Vi ((LV8.2) may help .. 😉
0 Kudos
Message 5 of 8
(7,975 Views)

Do you know if is there a way to extract version number without .net installed? Since i'don't want to force my customer to install .net.

Thankyou

Steve

0 Kudos
Message 6 of 8
(7,869 Views)
try this thread
http://forums.ni.com/ni/board/message?board.id=170&message.id=183560&jump=true

Paul
0 Kudos
Message 7 of 8
(7,848 Views)
0 Kudos
Message 8 of 8
(7,645 Views)