Skip to content

Commit

Permalink
installer: added InstallDirRegKey support
Browse files Browse the repository at this point in the history
  • Loading branch information
talanc committed Jun 22, 2019
1 parent d88ea35 commit 8a7fb87
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions installer/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ OutFile "vlisp-profiler-installer.exe"
; Installer default directory
InstallDir $LOCALAPPDATA\VLispProfiler

; Installer registry location
InstallDirRegKey HKCU "Software\VLispProfiler" "InstallLocation"

; Installer requires user only (per user install anyway)
RequestExecutionLevel user

Expand Down Expand Up @@ -45,6 +48,9 @@ Section "VLispProfiler (required)"
; Create VLispProfiler Setup shortcut
CreateShortcut "$INSTDIR\Setup.lnk" "$INSTDIR\vlisp-profiler.exe" "setup --interactive" "$INSTDIR\vlisp-profiler.exe" 0

; Registry install location
WriteRegStr HKCU "Software\VLispProfiler" "InstallLocation" $INSTDIR

; Uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"

Expand Down Expand Up @@ -91,4 +97,8 @@ Section "Uninstall"
RMDir "$SMPROGRAMS\VLispProfiler"
RMDir "$INSTDIR"

; Remove registry entries
DeleteRegValue HKCU "Software\VLispProfiler" "InstallLocation"
DeleteRegKey /ifempty HKCU "Software\VLispProfiler"

SectionEnd

0 comments on commit 8a7fb87

Please sign in to comment.