-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller.nsi
54 lines (36 loc) · 2.04 KB
/
installer.nsi
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
!define VERSION "1.0.1"
!include "FileFunc.nsh"
!include x64.nsh
Name "EdgeKiller"
OutFile "install.exe"
InstallDir $PROGRAMFILES64\EdgeKiller
RequestExecutionLevel admin
Section
SetOutPath $INSTDIR
File build\Release\EdgeKiller.exe
File build\Release\config.json
# Add the IFEO Debugger key
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe" "Debugger" "$\"$INSTDIR\EdgeKiller.exe$\""
WriteUninstaller $INSTDIR\uninstall.exe
# Add Uninstaller Data
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "DisplayName" "EdgeKiller"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "Publisher" "pochwix2"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "URLInfoAbout" "https://github.com/janek515/edgekiller"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "NoModify" 0x00000001
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "NoRepair" 0x00000001
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller" "EstimatedSize" $0
SectionEnd
Section "Uninstall"
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\EdgeKiller.exe
Delete $INSTDIR\config.json
RMDir $INSTDIR
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\EdgeKiller"
# Remove the IFEO Debugger key
DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe" "Debugger"
DeleteRegKey /ifempty HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\msedge.exe"
SectionEnd