fix: frozen windows installations (#282201)

* fix: frozen windows installations

fixes #196344
related to #228233
Co-authored-by: CyMad <90966823+CyMad7001@users.noreply.github.com>

* Update build/win32/code.iss

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: CyMad <90966823+CyMad7001@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
João Moreno
2025-12-09 16:21:52 +01:00
committed by GitHub
parent 26b983fd4a
commit f58990846d

View File

@@ -1357,7 +1357,7 @@ var
TaskKilled: Integer;
begin
Log('Stopping all tunnel services (at ' + ExpandConstant('"{app}\bin\{#TunnelApplicationName}.exe"') + ')');
ShellExec('', 'powershell.exe', '-Command "Get-WmiObject Win32_Process | Where-Object { $_.ExecutablePath -eq ' + ExpandConstant('''{app}\bin\{#TunnelApplicationName}.exe''') + ' } | Select @{Name=''Id''; Expression={$_.ProcessId}} | Stop-Process -Force"', '', SW_HIDE, ewWaitUntilTerminated, TaskKilled)
ShellExec('', 'powershell.exe', '-NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-WmiObject Win32_Process | Where-Object { $_.ExecutablePath -eq ' + ExpandConstant('''{app}\bin\{#TunnelApplicationName}.exe''') + ' } | Select @{Name=''Id''; Expression={$_.ProcessId}} | Stop-Process -Force"', '', SW_HIDE, ewWaitUntilTerminated, TaskKilled)
WaitCounter := 10;
while (WaitCounter > 0) and CheckForMutexes('{#TunnelMutex}') do