-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.nsh
More file actions
31 lines (23 loc) · 1.14 KB
/
installer.nsh
File metadata and controls
31 lines (23 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
!include "MUI2.nsh"
!include "LogicLib.nsh"
!define UPDATE_MODE_FILE "$APPDATA\Cryptone\update-mode"
Section "Install"
FileOpen $0 "${UPDATE_MODE_FILE}" w
FileClose $0
WriteRegStr HKCU "Software\Classes\*\shell\Cryptone" "" "Cryptone"
WriteRegStr HKCU "Software\Classes\*\shell\Cryptone" "Icon" "$INSTDIR\Cryptone.exe"
WriteRegStr HKCU "Software\Classes\*\shell\Cryptone\command" "" '"$INSTDIR\Cryptone.exe" "%1"'
WriteRegStr HKCU "Software\Classes\Directory\shell\Cryptone" "" "Cryptone"
WriteRegStr HKCU "Software\Classes\Directory\shell\Cryptone" "Icon" "$INSTDIR\Cryptone.exe"
WriteRegStr HKCU "Software\Classes\Directory\shell\Cryptone\command" "" '"$INSTDIR\Cryptone.exe" "%1"'
WriteUninstaller "$INSTDIR\Uninstall Cryptone.exe"
SectionEnd
Section "Uninstall"
IfFileExists "${UPDATE_MODE_FILE}" skipUninstall
DeleteRegKey HKCU "Software\Classes\*\shell\Cryptone\command"
DeleteRegKey HKCU "Software\Classes\*\shell\Cryptone"
DeleteRegKey HKCU "Software\Classes\Directory\shell\Cryptone\command"
DeleteRegKey HKCU "Software\Classes\Directory\shell\Cryptone"
skipUninstall:
Delete "${UPDATE_MODE_FILE}"
SectionEnd