From 4f9ccdd70f69dd0a879329d57ec21588f29f182c Mon Sep 17 00:00:00 2001 From: bas-vk Date: Sun, 11 Dec 2016 00:01:57 +0100 Subject: build: safe update of PATH on Windows (#3419) NSIS has a default MAX_STR_LEN of 1024. If $ENV{PATH} is longer the returned string is truncated to an empty string. Its then not possible to distinguis between the variable not set or too long. As a result the variable is set with the location where geth and/or dev tools are installed. This may override any previous set values. --- build/nsis.uninstall.nsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build/nsis.uninstall.nsh') diff --git a/build/nsis.uninstall.nsh b/build/nsis.uninstall.nsh index ea7d5e298..6358faa74 100644 --- a/build/nsis.uninstall.nsh +++ b/build/nsis.uninstall.nsh @@ -25,7 +25,8 @@ Section "Uninstall" ${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc" # Remove install directory from PATH - ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" $INSTDIR + Push "$INSTDIR" + Call un.RemoveFromPath # Cleanup registry (deletes all sub keys) DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${GROUPNAME} ${APPNAME}" -- cgit