|
|
@@ -132,7 +132,7 @@ Section "Install"
|
|
132
|
132
|
nsExec::Exec 'sc stop hbbr'
|
|
133
|
133
|
nsExec::Exec 'sc stop hbbs'
|
|
134
|
134
|
nsExec::Exec 'taskkill /F /IM ${PRODUCT_NAME}.exe'
|
|
135
|
|
- Sleep 500 ;
|
|
|
135
|
+ Sleep 500
|
|
136
|
136
|
|
|
137
|
137
|
SetOutPath $INSTDIR
|
|
138
|
138
|
File /r "setup\*.*"
|
|
|
@@ -142,12 +142,12 @@ Section "Install"
|
|
142
|
142
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
143
|
143
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
|
144
|
144
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
145
|
|
- CreateShortCut "$SMSTARTUP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
146
|
145
|
|
|
147
|
146
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=in action=allow program="$INSTDIR\hbbs.exe" enable=yes'
|
|
148
|
147
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=out action=allow program="$INSTDIR\hbbs.exe" enable=yes'
|
|
149
|
148
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=in action=allow program="$INSTDIR\hbbr.exe" enable=yes'
|
|
150
|
149
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=out action=allow program="$INSTDIR\hbbr.exe" enable=yes'
|
|
|
150
|
+ ExecWait 'powershell.exe -NoProfile -windowstyle hidden try { [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 } catch {}; Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList ($\'/silent$\', $\'/install$\') -Wait'
|
|
151
|
151
|
SectionEnd
|
|
152
|
152
|
|
|
153
|
153
|
Section "Uninstall"
|
|
|
@@ -155,7 +155,7 @@ Section "Uninstall"
|
|
155
|
155
|
nsExec::Exec 'sc stop hbbr'
|
|
156
|
156
|
nsExec::Exec 'sc stop hbbs'
|
|
157
|
157
|
nsExec::Exec 'taskkill /F /IM ${PRODUCT_NAME}.exe'
|
|
158
|
|
- Sleep 500 ;
|
|
|
158
|
+ Sleep 500
|
|
159
|
159
|
|
|
160
|
160
|
RMDir /r "$SMPROGRAMS\${APP_NAME}"
|
|
161
|
161
|
Delete "$SMSTARTUP\${APP_NAME}.lnk"
|
|
|
@@ -163,11 +163,16 @@ Section "Uninstall"
|
|
163
|
163
|
nsExec::Exec 'sc delete hbbr'
|
|
164
|
164
|
nsExec::Exec 'sc delete hbbs'
|
|
165
|
165
|
nsExec::Exec 'netsh advfirewall firewall delete rule name="${APP_NAME}"'
|
|
|
166
|
+ RMDir /r "$INSTDIR\bin"
|
|
|
167
|
+ RMDir /r "$INSTDIR\logs"
|
|
|
168
|
+ RMDir /r "$INSTDIR\service"
|
|
|
169
|
+ Delete "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
|
170
|
+ Delete "$INSTDIR\uninstall.exe"
|
|
166
|
171
|
SectionEnd
|
|
167
|
172
|
|
|
168
|
173
|
####################################################################
|
|
169
|
174
|
# Functions
|
|
170
|
175
|
|
|
171
|
176
|
Function CreateStartupShortcut
|
|
172
|
|
- CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
|
177
|
+ CreateShortCut "$SMSTARTUP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
173
|
178
|
FunctionEnd
|