From 8d9705cd3a151c0a3f0f4f340a92cd04c575b36f Mon Sep 17 00:00:00 2001 From: faumaray Date: Tue, 27 Oct 2026 13:47:45 +0300 Subject: [PATCH] windows: uninstall.cmd leaves the install folder before removing it Opened from Explorer, its window's working directory is the install folder, which Windows then cannot remove while the window waits at its pause: the files went, the folder stayed. Co-Authored-By: Claude Opus 5.5 --- windows/.cargo/config.toml | 4 +++- windows/tools/uninstall.cmd | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/windows/.cargo/config.toml b/windows/.cargo/config.toml index 9ca66d9..03b641c 100644 --- a/windows/.cargo/config.toml +++ b/windows/.cargo/config.toml @@ -8,6 +8,8 @@ rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=/ignore:4099"] # GPUI's build compiles its manifest with embed-resource, which would take the dev shell's RC # (MinGW's windres, for the C cross-compiler) and make a COFF object of it; with llvm-rc it makes # a .res, which the linker merges with the app's icon (crates/ps-gui/build.rs). Two resource -# objects it refuses. +# objects it refuses. (A target/ from before this keeps GPUI's object: cargo clean -p gpui-pre.) +# Building on Windows without llvm-rc: set RC_x86_64_pc_windows_msvc=rc.exe in the environment, +# which this does not override. [env] RC_x86_64_pc_windows_msvc = "llvm-rc" diff --git a/windows/tools/uninstall.cmd b/windows/tools/uninstall.cmd index 281a24a..1e3f149 100644 --- a/windows/tools/uninstall.cmd +++ b/windows/tools/uninstall.cmd @@ -5,5 +5,6 @@ net session >nul 2>&1 || ( powershell -NoProfile -Command "Start-Process -Verb RunAs -FilePath '%~f0'" exit /b ) -:: One line: cmd reads a batch file line by line, and this one is deleted meanwhile. -"%~dp0proxy-suite-service.exe" uninstall & pause & exit /b +:: One line: cmd reads a batch file line by line, and this one is deleted meanwhile. Out of +:: the folder first: opened from Explorer, this window would hold it (and keep it there). +cd /d "%SystemRoot%" & "%~dp0proxy-suite-service.exe" uninstall & pause & exit /b