8000 fix: do not truncate system PATH in win installer by deansheather · Pull Request #5243 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

fix: do not truncate system PATH in win installer #5243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions scripts/win-installer/path.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@

!include "WinMessages.nsh"

; Registry Entry for environment (NT4,2000,XP)
; All users:
; Registry Entry for system environment (NT4,2000,XP)
!define Environ 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
; Current user only:
;!define Environ 'HKCU "Environment"'


; AddToPath - Appends dir to PATH
; AddToPath - Appends dir to system PATH
; (does not work on Win9x/ME)
;
; Usage:
Expand All @@ -45,7 +42,7 @@ Function AddToPath
; Native calls are used here to check actual length of PATH

; $4 = RegOpenKey(HKEY_CURRENT_USER, "Environment", &$3)
System::Call "advapi32::RegOpenKey(i 0x80000001, t'Environment', *i.r3) i.r4"
System::Call "advapi32::RegOpenKey(i 0x80000002, t'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', *i.r3) i.r4"
IntCmp $4 0 0 done done
; $4 = RegQueryValueEx($3, "PATH", (DWORD*)0, (DWORD*)0, &$1, ($2=NSIS_MAX_STRLEN, &$2))
; RegCloseKey($3)
Expand Down Expand Up @@ -110,7 +107,7 @@ done:
FunctionEnd


; RemoveFromPath - Removes dir from PATH
; RemoveFromPath - Removes dir from system PATH
;
; Usage:
; Push "dir"
Expand Down
0