LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatic update on application

Hello

I would like to know if there is a way to create an automatic update on the computers that have my applications running on it.
So I would be sure that everybody has the same software version without going to every computer in the shop.
This would resemble to an automatic update made by microsoft for windows.

Any idea ?

Thanks

Julien
0 Kudos
Message 1 of 26
(7,553 Views)
Hi Julien,
you could insert a function into your program which connects to your server and check if the running version is the lastest. If not it downloads the newest version and start this.
Mike
Message 2 of 26
(7,552 Views)
Note that to do this you will need to set versions for your apps and you will need a way to check for the version. If you intend to check based on the properties of the file, then you will need to use the Windows API or .NET (the latter being much easier). See here for more information

Also, inserting a function in your EXE will just tell if there's a new version. Windows won't allow you to overwrite the application with the new version since it's already open. This means you need to write a small app that is actually the one that starts first. This small app then starts your executable after the version check.
Message 3 of 26
(7,532 Views)

I know it has been a long time since the last entry on this topic, but I'm wondering what is the best (optimal) solution for upgrading an application?

 

As mentioned in the last post we could build a small app (UPDATER.exe) that checks for the latest version of our main application, but should it:

 

a) Simply overwrite the current C:\Program Files\LV_MAIN_APP\<LV_MAIN_APP>.exe file with the new version?

b) or should it run the new SETUP.EXE Installation program that will uninstall the LV_MAIN_APP program and re-install the new version?

 

(a) would be nicer since it will be quick and not require any user intervention, but does this affect the Add/Remove Program function if it came to un-installing the application, or does it affect the registry since a new EXE was copied across rather than being installed?  Assuming we have the right privileges, will either method above work in Windows 7?

 

I suppose the other problem is what if we upgrade and build our MAIN_APP in a new version of LabVIEW, we now also have to install the new LVRT Engine.

 

So should we split the Installation into three processes:

1) LVRT Installation - LVRT Engine and other LV Plugins - Done manually when installing the application first time (Large size - 150MB).

2) MAIN_APP Installer - Just the executable (Small size - 10MB) - automatically updated by the UPDATER application.

3) UPDATER Installer - Just an executable (Very Small size <1MB) - Icon on desktop - runs the MAIN_APP.

 

But then of course what if you make changes to the UPDATER application - how is this updated automatically - it just keeps going round in circles.

 

Chris

0 Kudos
Message 4 of 26
(7,248 Views)

Hi Chris,

 

I think that either way you do it will work, but you will run into less issues if you go about it as suggested in way two.  You need to be careful that the runtime engines, .net and any other dlls that you call into are also updated.  In some cases this means that you also have to make sure that you have an up to date config file and ini file that reflects the version that you are using. 

 

Are you planning on having Updater something that installs with MAIN_APP or will it be something that can be accessed and distributed separately?

 

Regards,

Kira T

0 Kudos
Message 5 of 26
(7,229 Views)

Hi Kira,

Well I was planning to have the UPDATER and MAIN_APP as separate installations, since the MAIN_APP will need constant updates (new features + bug fixes), but the UPDATER will rarely need to be changed.

 

However if/when the UPDATER program does need changing then this will have to be done manually, because I can't have another program that updates the UPDATER program, since where would it end.

 

I am told I can give our IT Dept. the upgrade files and they somehow bundle them all into an install package that does it automatically, but I have my doubts.

 

Chris

0 Kudos
Message 6 of 26
(7,200 Views)

Hi Chris,

 

You're right about the UPDATER function eventually becoming repeptitive. You do need the UPDATER program to be a seperate executable from the MAIN_APP, but the choice between distributing in the same installer and making available seperately is just your preference.

 

Let us know if you have problems building your installer/automatic updater, especially if you opt to package them together in LabVIEW.

 

Have a nice day,

Zach P.

Staff Software Engineer | LabVIEW R&D | National Instruments
0 Kudos
Message 7 of 26
(7,171 Views)

I want to do something similar.   I want to do this the right way (i.e. I want my application to check online whether there is a newer version available and update itself if there is a newer version available.  I don't want to simply overwrite the application .exe executable with a newer version because there will be a version number mismatch in Programs and Features).  Looks like setup.exe has some command line options available.  Maybe /q might work?

 

Ofcourse the updating application must quit itself before running setup.exe.

 

 

Setup.exe options

 

Sidd

 

0 Kudos
Message 8 of 26
(7,064 Views)

I am doing something very similar. I obtained a small program from our IT Admin that will push files into certain folders on computers I call out by name. I just started experimenting with this yesterday, and most of the time it works fine, but sometimes chokes on the alias file. Does the alias file need to be updated, or am I OK with just the exe, ini, and config files? I understand that I need to do things manually for new LabVIEW versions, or patches requiring runtime updates.

0 Kudos
Message 9 of 26
(7,041 Views)

Hello,

 

I'm intrested by the UPDATER App.

 

Can you provide a labview code example please ? 

 

🙂

0 Kudos
Message 10 of 26
(6,903 Views)