Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(remote-desktop): 卸载服务时复用 UAC 提权入口

Dashab02f246e8dc
diff --git a/apps/desktop/resources/installer.nsh b/apps/desktop/resources/installer.nsh
index ab6a42ff46..a60dfbadc8 100644
--- a/apps/desktop/resources/installer.nsh
+++ b/apps/desktop/resources/installer.nsh
@@ -87,6 +87,13 @@
nsExec::ExecToStack '"$INSTDIR\resources\tools\remote-desktop\cindy-windows-desktop-host.exe" --uninstall'
Pop $R0
Pop $R1
+ ${If} $R0 != 0
+ ; Per-user uninstallers may lack service permissions. Keep the direct path
+ ; first so missing services (including ordinary per-user installs) need no UAC.
+ nsExec::ExecToStack '"$INSTDIR\resources\tools\remote-desktop\cindy-windows-desktop-host.exe" --elevate-uninstall'
+ Pop $R0
+ Pop $R1
+ ${EndIf}
${If} $R0 != 0
MessageBox MB_OK|MB_ICONSTOP "Could not stop the Cindy remote desktop service. Run the uninstaller as administrator and try again."
Abort