forked from n-air-app/n-air-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
installer.nsh
26 lines (21 loc) · 828 Bytes
/
installer.nsh
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
!macro registerProtocol Protocol
DetailPrint "Register ${Protocol} URI Handler"
DeleteRegKey HKCU "Software\Classes\${Protocol}"
WriteRegStr HKCU "Software\Classes\${Protocol}" "" "URL:${Protocol}"
WriteRegStr HKCU "Software\Classes\${Protocol}" "URL Protocol" ""
WriteRegStr HKCU "Software\Classes\${Protocol}\shell" "" ""
WriteRegStr HKCU "Software\Classes\${Protocol}\shell\Open" "" ""
WriteRegStr HKCU "Software\Classes\${Protocol}\shell\Open\command" "" '"$appExe" "%1"'
!macroend
!macro unregisterProtocol Protocol
DeleteRegKey HKCU "Software\Classes\${Protocol}"
!macroend
!macro customInstall
FileOpen $0 "$INSTDIR\installername" w
FileWrite $0 $EXEFILE
FileClose $0
!insertMacro registerProtocol "n-air-app"
!macroend
!macro customUninstall
!insertMacro unregisterProtocol "n-air-app"
!macroend