fix: 统一端口并完善桌面端授权和安装

This commit is contained in:
2026-05-20 16:54:24 +08:00
parent 22c343a85e
commit 1288553df8
22 changed files with 363 additions and 363 deletions
+23
View File
@@ -1,3 +1,26 @@
!macro ResolveCapacityReportInstallDir
${If} ${FileExists} "D:\*.*"
StrCpy $R9 "D:\Program Files\${PRODUCTNAME}"
${Else}
${If} ${RunningX64}
StrCpy $R9 "$PROGRAMFILES64\${PRODUCTNAME}"
${Else}
StrCpy $R9 "$PROGRAMFILES\${PRODUCTNAME}"
${EndIf}
${EndIf}
!macroend
!macro NSIS_HOOK_PREINSTALL
!insertmacro ResolveCapacityReportInstallDir
StrCpy $INSTDIR "$R9"
SetOutPath "$INSTDIR"
!macroend
!macro NSIS_HOOK_POSTINSTALL
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}"
DeleteRegKey HKCU "Software\${MANUFACTURER}\${PRODUCTNAME}"
!macroend
!macro NSIS_HOOK_PREUNINSTALL
nsExec::ExecToLog 'taskkill /F /T /IM capacity-report-desktop.exe'
nsExec::ExecToLog 'taskkill /F /T /IM capareport-server.exe'