LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Check for Executable Updates LabVIEW 2011

Solved!
Go to solution

I have prodded around and have not seen anything to this effect, but I know it must be out there (Hopefully so simple no one posts about it?)

PROBLEM

I need a program that checks for the newest version of  executable(s) against copies on a server, and updates them before running.

 

BACKGROUND

I have several executables I run off the company server on several mobile laptops that get used for data acquisition on the factory floor. They are run off the server because previously, whenever a small update was made, I was forced to trot around with a flash drive and update everything manually. Now I just update the executable after hours and the one file everything references is updated. HOWEVER, the server cannot be rebooted when these files are running off of it, and these executables are often being used days at a time for collection. 

MORE RAMBLING

If this is something that is worked into the executable package or distribution process, it would be great, however I've poked around and not seen anything. Thanks to anyone that offers FRIENDLY CONSTRUCTIVE INPUT!!!!!

0 Kudos
Message 1 of 10
(3,655 Views)

If you have a splash screen, that's probably a good place to put a check for updates.  Use the FileVersionInfo VI to get the EXE version and compare it to the version on your server.  If a new version is found, you can have your splash screen archive the old program, copy over the new program and then launch it. 

 

If your programs runs for weeks without being shut down, you could put in a daily update routine that will automatically check for updates when not busy.  If done in this manner, you may need a separate update utility that is called before closing out the main.exe.  The updater handles the process of archiving and copying the program files, and when complete, it should call the main.exe again. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 2 of 10
(3,624 Views)
Solution
Accepted by topic author MontgomeryScott

There are some 3rd party tools to help with this too.  BLT is one that I've heard of but never used, and WireBird Labs had something called Deploy that I'm unsure of its status.  Beyond that wrapping your own is possible by checking the version on startup, and then having another built application get called which closes the first, runs the update (silently) then runs the updated program again.  Certainly possible but I haven't seen any free and open source solution posted.

Message 3 of 10
(3,618 Views)

I like the idea of wrapping a program in a program. I didn't think LabVIEW would take too kindly to that, but I had never thought of programatically closing the first program, doing the update, then resuming. I really like the concept because I have several programs I need to do this with. I can create the "shell" to do the dirty work and have it programatically detect local drive file location, and have it search for the matching .exe location on the server. When found, copy all folder contents and reboot. If I do it right, I just need to slap it in the front of the program and it will do the rest. 

 

Thanks, I'll get on this soon!

Message 4 of 10
(3,590 Views)

@MontgomeryScott wrote:

I like the idea of wrapping a program in a program. I didn't think LabVIEW would take too kindly to that.


Just to be clear, you wouldn't be wrapping a program in a program.  These would be two separate EXE files.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 10
(3,572 Views)

What if the first executable does the version check. If a new version is found"

1. It opens an "update manager" exe.

2. I somehow send info from one .exe to the other. (This would be the program locations.)

3. The first program STOPS and exits

4. Update manager copies, pastes and does one of 2 things

     a.Opens original exe path THEN EXITS

     b. Creates pop up telling user a new version was found and EXITS. User reopens exe

 

0 Kudos
Message 6 of 10
(3,557 Views)

Yes that is basically the idea.  There really is no need to send info from one EXE to the other however.  Choose a global location (on a server, etc) where you keep all updates for your programs and each app would have an INI setting to this directory (including the updater).  Updater would likely be located in the same directory as your main.exe.

 

Main program would check the directory to see if update exists.  If yes, start the updater and exit.  This check could be done on startup of your app (i.e. in a splash screen), once a day, on button/menu press, etc.  You could present the user with the option of what to do after the update is applied.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 7 of 10
(3,554 Views)

I am in need of a similar solution to deploy updates to distributed application that I have built in LV. I looked at the Wire Bird Labs option but it appears to be shut down FYI. This link should be removed from the solution. BLT does seem to be active still. 

0 Kudos
Message 8 of 10
(2,977 Views)

@MontgomeryScott
Any updates here? Were you able to make a viable application update tool?

 




0 Kudos
Message 9 of 10
(2,972 Views)

Well one new solution in the last couple years would be the NI Package Manager.  NI distributes their software and tools via the NIPM and it has an API that you can use.  If your application is built into a package, you can then have it subscribe to a feed that you create, and can have it check for updates to your package on that feed and install them if there is one.

 

Here is one thread talking about the idea, but I personally haven't done it.

 

https://forums.ni.com/t5/LabVIEW/Good-time-to-run-programmatic-NI-package-update/m-p/3848060

Message 10 of 10
(2,964 Views)