From b4330555a4a715bb1a569c66b2a3887b7aa04db7 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 30 Aug 2026 16:37:25 -0400 Subject: [PATCH] fix(windows/installer): PATH update reg add /f option ordering Moves `/f` before `/d` in the `add` path update command and aligns comments for both add/remove flows. This avoids localized Windows systems ignoring `/f` when placed last, preventing installer hangs on overwrite prompts. --- src_assets/windows/misc/path/update-path.bat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src_assets/windows/misc/path/update-path.bat b/src_assets/windows/misc/path/update-path.bat index 3274c6a5744..b091efce7cc 100644 --- a/src_assets/windows/misc/path/update-path.bat +++ b/src_assets/windows/misc/path/update-path.bat @@ -46,7 +46,9 @@ if /i "%~1"=="add" ( rem Only update if path was changed if "!NEW_PATH!" neq "!CURRENT_PATH!" ( rem Set the new path in the registry - reg add "%KEY_NAME%" /v "%VALUE_NAME%" /t REG_EXPAND_SZ /d "!NEW_PATH!" /f + rem Some localized systems may unexpectedly ignore /f at the end of the command. + rem Keep it before /d so the installer never waits for overwrite confirmation. + reg add "%KEY_NAME%" /v "%VALUE_NAME%" /t REG_EXPAND_SZ /f /d "!NEW_PATH!" if !ERRORLEVEL!==0 ( echo Successfully added Sunshine directories to PATH ) else ( @@ -94,8 +96,8 @@ if /i "%~1"=="remove" ( rem Only update if path was changed if "!CHANGES_MADE!"=="1" ( rem Set the new path in the registry - rem Windows systems running Chinese may unexpectedly ignore the /f option at the end of the command. - rem This issue only occurs with the remove command. + rem Some localized systems may unexpectedly ignore /f at the end of the command. + rem Keep it before /d so the installer never waits for overwrite confirmation. reg add "%KEY_NAME%" /v "%VALUE_NAME%" /t REG_EXPAND_SZ /f /d "!CURRENT_PATH!" if !ERRORLEVEL!==0 ( echo Successfully removed Sunshine directories from PATH