8000 Windows installer wipes system PATH environment variable · Issue #5240 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
Windows installer wipes system PATH environment variable #5240
Closed
@cmor

Description

@cmor

The Windows installer script at https://github.com/coder/coder/blob/main/scripts/win-installer/path.nsh overwrites the system PATH environment variable incorrectly.

Currently the install script:

  • Reads from HKEY_CURRENT_USER\Environment\Path:

System::Call "advapi32::RegOpenKey(i 0x80000001, t'Environment', *i.r3) i.r4"

  • Appends the new coder folder

  • Writes to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment:

WriteRegExpandStr ${Environ} "PATH" $0

This causes a loss of the system environment variable (overwirtten by the user environment variable).

Perhaps reading from the system environment variable with something like:
System::Call "advapi32::RegOpenKey(i 0x80000002, t'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', *i.r3) i.r4"
Should fix.

Metadata

Metadata

Assignees

Labels

cliArea: CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0