|
|
@@ -67,7 +67,7 @@ Section "Install"
|
|
67
|
67
|
nsExec::Exec 'sc stop hbbr'
|
|
68
|
68
|
nsExec::Exec 'sc stop hbbs'
|
|
69
|
69
|
nsExec::Exec 'taskkill /F /IM ${PRODUCT_NAME}.exe'
|
|
70
|
|
- Sleep 500 ;
|
|
|
70
|
+ Sleep 500
|
|
71
|
71
|
|
|
72
|
72
|
SetOutPath $INSTDIR
|
|
73
|
73
|
File /r "setup\*.*"
|
|
|
@@ -77,12 +77,12 @@ Section "Install"
|
|
77
|
77
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
78
|
78
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
|
79
|
79
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
80
|
|
- CreateShortCut "$SMSTARTUP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
81
|
80
|
|
|
82
|
81
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=in action=allow program="$INSTDIR\hbbs.exe" enable=yes'
|
|
83
|
82
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=out action=allow program="$INSTDIR\hbbs.exe" enable=yes'
|
|
84
|
83
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=in action=allow program="$INSTDIR\hbbr.exe" enable=yes'
|
|
85
|
84
|
nsExec::Exec 'netsh advfirewall firewall add rule name="${APP_NAME}" dir=out action=allow program="$INSTDIR\hbbr.exe" enable=yes'
|
|
|
85
|
+ 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'
|
|
86
|
86
|
SectionEnd
|
|
87
|
87
|
|
|
88
|
88
|
Section "Uninstall"
|
|
|
@@ -90,7 +90,7 @@ Section "Uninstall"
|
|
90
|
90
|
nsExec::Exec 'sc stop hbbr'
|
|
91
|
91
|
nsExec::Exec 'sc stop hbbs'
|
|
92
|
92
|
nsExec::Exec 'taskkill /F /IM ${PRODUCT_NAME}.exe'
|
|
93
|
|
- Sleep 500 ;
|
|
|
93
|
+ Sleep 500
|
|
94
|
94
|
|
|
95
|
95
|
RMDir /r "$SMPROGRAMS\${APP_NAME}"
|
|
96
|
96
|
Delete "$SMSTARTUP\${APP_NAME}.lnk"
|
|
|
@@ -98,11 +98,16 @@ Section "Uninstall"
|
|
98
|
98
|
nsExec::Exec 'sc delete hbbr'
|
|
99
|
99
|
nsExec::Exec 'sc delete hbbs'
|
|
100
|
100
|
nsExec::Exec 'netsh advfirewall firewall delete rule name="${APP_NAME}"'
|
|
|
101
|
+ RMDir /r "$INSTDIR\bin"
|
|
|
102
|
+ RMDir /r "$INSTDIR\logs"
|
|
|
103
|
+ RMDir /r "$INSTDIR\service"
|
|
|
104
|
+ Delete "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
|
105
|
+ Delete "$INSTDIR\uninstall.exe"
|
|
101
|
106
|
SectionEnd
|
|
102
|
107
|
|
|
103
|
108
|
####################################################################
|
|
104
|
109
|
# Functions
|
|
105
|
110
|
|
|
106
|
111
|
Function CreateStartupShortcut
|
|
107
|
|
- CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
|
112
|
+ CreateShortCut "$SMSTARTUP\${APP_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"
|
|
108
|
113
|
FunctionEnd
|