Hi,
If you have build and app.exe and want to make a update button.
I put the new app version on this share \\server\release\app.exe
How do i make it update? Update click download the new app.exe from share and close the old app and start the new app up
how would you manage to do that?
Update button new app release from share?
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Update button new app release from share?
A running app cannot update itself. If you search carefully, you can find many examples of ways to detect an available update and apply the update from an MSI or from another app that is responsible for the update.
There are many ways to do this. It is not possible to advise you as to how to do this from the sketchy information you have provided. If you search and review the many methods, you will likely find one that matches your requirements.
There are many ways to do this. It is not possible to advise you as to how to do this from the sketchy information you have provided. If you search and review the many methods, you will likely find one that matches your requirements.
Re: Update button new app release from share?
Thanks for the useful updating. I will sue that info during my research
Re: Update button new app release from share?
so we need two app?
the program.
the updater.
Program trigger the updater who run the update files process? and then start the new program up again?
the program.
the updater.
Program trigger the updater who run the update files process? and then start the new program up again?
Re: Update button new app release from share?
I perform auto-updates in my ui apps. I look inside a 'store' fileshare and compare the (Get-ChildItem "$MyScript").versioninfo.fileversion. If the store one is later..
1. rename (get-process -id $pid).path with an '.old' file extension (you can rename but not remove as it's inuse)
2. copy in the new version
3. close the running version and run up the new copy via
$st = new-object System.Diagnostics.ProcessStartInfo
$st.FileName = "$MyScript"
$st.Arguments = ""
$st.CreateNoWindow = $false
$st.WindowStyle = ProcessWindowStyle.Maximized
$np = [System.Diagnostics.Process]::Start($St)
The fact that the $MainForm.Close() precedes this and it still manages to hit the [System.Diagnostics.Process]::Start($St) is probably a matter of lucky timing, but it has always worked.
1. rename (get-process -id $pid).path with an '.old' file extension (you can rename but not remove as it's inuse)
2. copy in the new version
3. close the running version and run up the new copy via
$st = new-object System.Diagnostics.ProcessStartInfo
$st.FileName = "$MyScript"
$st.Arguments = ""
$st.CreateNoWindow = $false
$st.WindowStyle = ProcessWindowStyle.Maximized
$np = [System.Diagnostics.Process]::Start($St)
The fact that the $MainForm.Close() precedes this and it still manages to hit the [System.Diagnostics.Process]::Start($St) is probably a matter of lucky timing, but it has always worked.