-
Notifications
You must be signed in to change notification settings - Fork 3
/
parental-control.nsi
86 lines (60 loc) · 2.07 KB
/
parental-control.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
85
86
; The name of the installer
Name "Parental Control"
; The file to write
OutFile "parental-control-setup.exe"
!include "MUI.nsh"
!insertmacro MUI_PAGE_LICENSE "LICENSE"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
; Uninstall pages
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
; The default installation directory
InstallDir $PROGRAMFILES64\parental-control
; The text to prompt the user to enter a directory
DirText "This will install My Cool Program on your computer. Choose a directory"
RequestExecutionLevel admin
;--------------------------------
; The stuff to install
Section "Primary service" ;No components page, name is not important
SectionIn RO ; Read only, always installed
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File parental-control.exe
File parental-control-web.exe
File parental-control-service.exe
File parental-control-service.xml
File config.yml
File users-config.yml
File README.md
File LICENSE
File parental-control-web-service.exe
File parental-control-web-service.xml
File bundle.js
File index.html
WriteUninstaller $INSTDIR\Uninstall.exe
; nsExec::ExecToStack '"$INSTDIR\reic\refresh.bat"'
ExecWait '"$INSTDIR\parental-control-service.exe" install'
ExecWait '"$INSTDIR\parental-control-service.exe" start'
ExecWait '"$INSTDIR\parental-control-web-service.exe" install'
ExecWait '"$INSTDIR\parental-control-web-service.exe" start'
SectionEnd ; end the section
;Section "Web interface"
;SetOutPath $INSTDIR
;File parental-control-web-service.exe
;File parental-control-web-service.xml
;File bundle.js
;File index.html
;ExecWait '"$INSTDIR\parental-control-service.exe" install'
;ExecWait '"$INSTDIR\parental-control-service.exe" start'
;SectionEnd
; The uninstall section
Section "Uninstall"
ExecWait '"$INSTDIR\parental-control-web-service.exe" stop'
ExecWait '"$INSTDIR\parental-control-web-service.exe" uninstall'
ExecWait '"$INSTDIR\parental-control-service.exe" stop'
ExecWait '"$INSTDIR\parental-control-service.exe" uninstall'
RMDir /r "$INSTDIR\*.*"
RMDir $INSTDIR
SectionEnd