From 4ef856ab99eb116f59162886df3f66f9a67d272d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=BA=E6=98=8E=E7=AB=B9=E9=9A=8F?= Date: Mon, 30 Mar 2026 23:04:13 +0800 Subject: [PATCH] fix(windows): update-path.bat registry command syntax in installer (#4902) --- src_assets/windows/misc/path/update-path.bat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src_assets/windows/misc/path/update-path.bat b/src_assets/windows/misc/path/update-path.bat index d235ec0e..3274c6a5 100644 --- a/src_assets/windows/misc/path/update-path.bat +++ b/src_assets/windows/misc/path/update-path.bat @@ -94,7 +94,9 @@ if /i "%~1"=="remove" ( rem Only update if path was changed if "!CHANGES_MADE!"=="1" ( rem Set the new path in the registry - reg add "%KEY_NAME%" /v "%VALUE_NAME%" /t REG_EXPAND_SZ /d "!CURRENT_PATH!" /f + 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. + 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 ) else (