diff --git a/core/updater.py b/core/updater.py index ad23b89..703c7f3 100644 --- a/core/updater.py +++ b/core/updater.py @@ -272,24 +272,23 @@ class UpdateChecker: exe_dir = os.path.dirname(current_exe) ps_content = f""" -$ErrorActionPreference = 'Stop' $pid = {pid} $src = '{new_exe}' $dst = '{current_exe}' -$mei = '{mei_dir}' -$exeDir = '{exe_dir}' $tempDir = '{tmp_dir}' # Wait for old process to exit while (Get-Process -Id $pid -ErrorAction SilentlyContinue) {{ Start-Sleep -Seconds 1 }} -Start-Sleep -Seconds 2 +Start-Sleep -Seconds 3 -# Clean ALL stale _MEI directories (PyInstaller temp dirs) -Get-ChildItem -Path $tempDir -Directory -Filter '_MEI*' -ErrorAction SilentlyContinue | ForEach-Object {{ - Remove-Item -Path $_.FullName -Recurse -Force -ErrorAction SilentlyContinue -}} +# Clean ALL stale _MEI directories (best-effort, skip locked) +try {{ + Get-ChildItem -Path $tempDir -Directory -Filter '_MEI*' -ErrorAction SilentlyContinue | ForEach-Object {{ + Remove-Item -Path $_.FullName -Recurse -Force -ErrorAction SilentlyContinue + }} +}} catch {{}} Start-Sleep -Seconds 1 # Copy with retry @@ -311,8 +310,8 @@ if (-not $copied) {{ exit 1 }} Start-Sleep -Seconds 2 -# Launch new exe via explorer.exe (mimics user double-click, clean environment) -Start-Process explorer.exe $dst +# Launch new exe via cmd start (clean environment, proper path handling) +Start-Process cmd.exe -ArgumentList '/c', 'start', '""', ('"{0}"' -f $dst) -WindowStyle Hidden # Cleanup Start-Sleep -Seconds 3 diff --git a/releases/ServerManager-v1.8.90-win-x64.exe b/releases/ServerManager-v1.8.90-win-x64.exe new file mode 100644 index 0000000..e9f58ff Binary files /dev/null and b/releases/ServerManager-v1.8.90-win-x64.exe differ diff --git a/version.py b/version.py index 7de4e39..1ff8876 100755 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ """Version info for ServerManager.""" -__version__ = "1.8.89" +__version__ = "1.8.90" __app_name__ = "ServerManager" __author__ = "aibot777" __description__ = "Desktop GUI for managing remote servers"