Skip to content
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

[core] Windows: Only remove Pulsar/PPM from PATH during uninstall #1183

Merged
merged 2 commits into from
Jan 17, 2025
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
9 changes: 7 additions & 2 deletions resources/win/installer.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ XPStyle on
!macro customUnInstall ; Macro called by electron-builder
; Since adding the PATH occurs during installation, we want to ensure to remove it.
; Luckily 'EnvVarUpdate' handles the case of it not being present
${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR\resources"
${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR\resources\app\ppm\bin"
${ifNot} ${isUpdated}
; Only run uninstall steps if truly uninstalling. Prevents this step from
; running during an upgrade, where it technically runs after the upgrade's
; install steps, ultimately removing Pulsar from the PATH
${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR\resources"
${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR\resources\app\ppm\bin"
${endIf}
!macroend

!macro MUI_PAGE_ADD_TO_PATH ; Define our custom macro
Expand Down
Loading