mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Wait for process to terminate instead of waiting a fixed amount of time.
This commit is contained in:
@@ -120,7 +120,7 @@ namespace GHelper.AutoUpdate
|
|||||||
Logger.WriteLine(zipName);
|
Logger.WriteLine(zipName);
|
||||||
Logger.WriteLine(exeName);
|
Logger.WriteLine(exeName);
|
||||||
|
|
||||||
string command = $"Start-Sleep -Seconds 1; $ErrorActionPreference = \"Stop\"; Expand-Archive \"{zipName}\" -DestinationPath . -Force; Remove-Item \"{zipName}\" -Force; \".\\{exeName}\"; ";
|
string command = $"$ErrorActionPreference = \"Stop\"; Wait-Process -Name \"GHelper\"; Expand-Archive \"{zipName}\" -DestinationPath . -Force; Remove-Item \"{zipName}\" -Force; \".\\{exeName}\"; ";
|
||||||
Logger.WriteLine(command);
|
Logger.WriteLine(command);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user