Jump to content

Querying the build number of a built executable from another built executable


Recommended Posts

Hello everyone,

I am writing a few applications that will be used my people within our office. Assuming that to use the application you must install a copy of it on your local hard drive then I would like the user to be notified if a newer version is available and offer them the chance to upgrade.

One way I could do this is by changing the filename of the executable when I build a new version, eg from myApp_v1.exe to myApp_v2.exe. Then it is easy to compare file names and if newer copy the newer version across.

However, this seems a bit of a 'hacky' way of doing things. I would like to compare the build version numbers instead. I know how to get the build number from within a build vi but how do I find out what it is on the remote (and possibly newer) executable?

If you have any pointers/tips it would be very much appreciated. I need to implement something or I will have to keep on track of who has the software installed so I can update them manually & with >500 engineers that would be a real pain.

Thanks very much,

Martin

Link to comment

Here's something I whipped up. It uses a VBScript to get the version of a file. I then had LabVIEW call it through a command line and parse the output. It's not the cleanest method by any means, but it was the fastest. I googled getting file version and one of the first things that came up was a VBScript for it. This VI should return the same build version that you have in a Build Specification in the application builder. I didn't do any error checking on if the file doesn't exist, so if you just run it without a path it will not error out, and the version will be blank. The VI is saved in 8.6.

GetFileVersion.zip

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.