fix(windows): update-path.bat registry command syntax in installer (#4902)

This commit is contained in:
空明竹随
2026-03-30 23:04:13 +08:00
committed by GitHub
parent d03334693c
commit 4ef856ab99

View File

@@ -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 (