LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Progarmatically update exe

Solved!
Go to solution

Hi,

How can I replace the older labview exe file with a new exe file, which avilable on server, programatically.

Means I am giving an option to the user to check for any updates in the softwre.

By comparing the old version and new version from .ini file in both local and server pc i can find out if there any new release. But how can I replace the exe, if user wish to update, programatically.

Never send a human to do a machine's job.
0 Kudos
Message 1 of 7
(4,848 Views)
Solution
Accepted by topic author harisiam

I do this by creating an update EXE.  At some specified interval (daily, weekly), "main" will check an update folder for a new version.  If it finds one, "main" will call "update" and main exits.  "Update" will archive the existing "main" and replace it with the new "main".  The new "main" is opened and "update" exits. 

aputman
0 Kudos
Message 2 of 7
(4,836 Views)

 Ok I ll do the same and check.

Never send a human to do a machine's job.
0 Kudos
Message 3 of 7
(4,829 Views)
Solution
Accepted by topic author harisiam

Another way to do it eliminates one step.  I just saw in another thread this week where a person asked a similar question. LabVIEW Applications Updates

 

When you call your .exe, you actually just call a launcher program.  It does the checking, if it finds nothing new (or can't do the check because of some error such as the network is down) it launches the executable existing on your PC.  If the check finds a newer one is available, it copies that over from the server to your PC and launches that.

 

So instead of Program (checks) >>  Updater >> Program

it is                 Launcher (checks) >> Program

 

Your launcher program can have a nice splash screen.

0 Kudos
Message 4 of 7
(4,818 Views)

Yeah, that is a good idea as well.  If you want something fully featured, you would probably have a combination of the two, with also a manual check for updates initiated by the user. Sometimes, production line software doesn't get shutdown and restarted often enough and frequent updates may go unnoticed without some regular interval check.  

aputman
0 Kudos
Message 5 of 7
(4,810 Views)

Yea.. Both are good ideas..

But In my case we have to give the user a button for software update check.

So I have to launch the main software first and launch the update exe if user want to update..

I will try out this method.. come back..

 

Thanks for the support

Never send a human to do a machine's job.
0 Kudos
Message 6 of 7
(4,775 Views)

Hi Harisam,

 

But In my case we have to give the user a button for software update check.

So I have to launch the main software first…

Why do you need to start your "main software" to present a button to the user?

I also use this "Launcher/Check" -> "start main" approach: when the launcher notices an update it presents a dialog to the user with two buttons "Update now" or "Postpone the update"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(4,769 Views)