EXE Form - overwrite itself
Posted: Tue Sep 25, 2018 1:59 am
Hello,
I have prepared very simple autoupdate concept:
1. Read remote json file, check value of the version key, compare it with FileVersionInfo from exe file
2. If they don't match, download executable and overwrite itself
But dealing with this when script is packaged as exe is major pain: the exe file is blocked from overwrite itself because the process is using it. If I close process, I won't able to execute "copy&overwrite".
If this would be c#, I would use Squierl.Windows or something similar but it's Powershell so I can't. Any way to achieve such simple autoupdate concept?
I have prepared very simple autoupdate concept:
1. Read remote json file, check value of the version key, compare it with FileVersionInfo from exe file
2. If they don't match, download executable and overwrite itself
But dealing with this when script is packaged as exe is major pain: the exe file is blocked from overwrite itself because the process is using it. If I close process, I won't able to execute "copy&overwrite".
If this would be c#, I would use Squierl.Windows or something similar but it's Powershell so I can't. Any way to achieve such simple autoupdate concept?