-
Notifications
You must be signed in to change notification settings - Fork 0
/
agtv.nsi
84 lines (54 loc) · 2 KB
/
agtv.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
; agtv.nsi
!include "MUI.nsh"
; -------------------------------
; Start
!define /file VERSION "version.txt"
!define /file ARCH "arch.txt"
!define company "AbyleDotOrg"
!define icon "agtv.ico"
!define MUI_PRODUCT "agtv"
!define MUI_FILE "agtv"
!define MUI_VERSION ${VERSION}
!define MUI_BRANDINGTEXT "agtv"
CRCCheck On
; The name of the installer
Name "agtv"
; The file to write
OutFile "agtv-${VERSION}-core-${ARCH}-installer.exe"
!define MUI_ICON "agtv.ico"
!define MUI_UNICON "agtv.ico"
; The default installation directory
InstallDir $PROGRAMFILES\agtv
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "install" ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File /r /x *.txt /x *.bat *.*
;create desktop shortcut
CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" ""
WriteUninstaller "$INSTDIR\Uninstall.exe"
;write uninstall information to the registry
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "DisplayName" "${MUI_PRODUCT} (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "UninstallString" "$INSTDIR\Uninstall.exe"
SectionEnd ; end the section
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Delete Files
RMDir /r "$INSTDIR\*.*"
;Remove the installation directory
RMDir "$INSTDIR"
;Delete Start Menu Shortcuts
Delete "$DESKTOP\agtv.lnk"
;Delete Uninstaller And Unistall Registry Entries
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${MUI_PRODUCT}"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}"
SectionEnd