b40deb0d5f
setx truncates values at 1024 characters, and the old code fed it the merged process PATH (system + user), permanently duplicating every system entry into the user hive and silently dropping anything past the limit. Read and rewrite only the HKCU Environment Path value with winreg, preserving REG_EXPAND_SZ, and broadcast WM_SETTINGCHANGE. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>