Fix(server): stop at startup when the process runs at Low integrity
An exe carrying a Low integrity label makes Windows downgrade the process token, so HKCU reads/writes and %TEMP% logging all fail silently: the settings dialog shows defaults, saving does nothing, and no log file is ever written. Nothing in the UI hints at the real cause. - Read TokenIntegrityLevel on startup and abort when below Medium - Print the icacls fix command; Yes copies it to the clipboard - Never fall through into the main window: running at Low IL is useless - Keep the service-spawned agent silent, otherwise the 10-second relaunch loop turns the dialog into a flood - Do not try runas: with UAC approval mode off it is a no-op and the child inherits Low, so icacls fails with "cannot assign the specified label" - Add en_US / zh_TW / de_DE translations The check has to run before both the UAC relaunch and the service self-heal. Placed after HandleServiceCommandLine, a double-click installs/starts the service, returns TRUE and exits, so the dialog could only come from the service-spawned agent - which stays silent to avoid a flood, and the user saw nothing at all. Placed after LaunchAsAdmin, a Low process without admin rights loops forever, because runas spawns a child that is still Low. Service commands (-service/-install/-uninstall) are exempted so the service can still be installed and removed. Co-Authored-By: DeepSeek-V4.1-Flash
This commit is contained in:
1 parent
7faca2c01b
commit
d987941e57
4 files changed
+166
-13
No files matched your search
@@ -2257,3 +2257,8 @@ APK
|
||||
这个 APK 里没有找到本主控的标识,装上去很可能连不回本服务器。\n\n请确认它是「生成客户端 → 安卓」导出的包,并且已经用 android/sign_apk.bat 重新签名(未重签的包签名对不上,系统会拒绝覆盖安装)。\n\n文件:\n%s\n\n仍然下发吗?=這個 APK 裡沒有找到本主控的標識,裝上去很可能連不回本伺服器。\n\n請確認它是「生成客戶端 → 安卓」匯出的包,並且已經用 android/sign_apk.bat 重新簽名(未重簽的包簽名對不上,系統會拒絕覆寫安裝)。\n\n檔案:\n%s\n\n仍然下發嗎?
|
||||
APK 已下发。\n\n接下来的操作需要在设备上完成:\n1. 若没弹出安装框,可能是系统未授权「安装未知应用」——在设备的应用设置里给 YAMA 打开;\n2. 点「安装」确认覆盖安装;\n3. 安装完成后打开 YAMA,重新授权录屏(升级后授权一定会失效)。=APK 已下發。\n\n接下來的操作需要在裝置上完成:\n1. 若沒彈出安裝框,可能是系統未授權「安裝未知應用」——在裝置的應用設定裡給 YAMA 打開;\n2. 點「安裝」確認覆寫安裝;\n3. 安裝完成後打開 YAMA,重新授權錄屏(升級後授權一定會失效)。
|
||||
确认=確認
|
||||
; === 完整性级别自检(Low Integrity 提示) ===
|
||||
本程序运行在「低完整性」模式下,部分功能会异常。\n\n请以管理员身份打开命令提示符,执行:\n\n %s\n\n执行后重新启动本程序。\n\n点「是」复制上面的命令,点「否」关闭。=本程式執行在「低完整性」模式下,部分功能會異常。\n\n請以系統管理員身分開啟命令提示字元,執行:\n\n %s\n\n執行後重新啟動本程式。\n\n點「是」複製上面的命令,點「否」關閉。
|
||||
完整性级别受限=完整性層級受限
|
||||
修复命令已复制到剪贴板。\n\n请按 Win+X 打开「终端(管理员)」,粘贴执行后再重新启动本程序。=修復命令已複製到剪貼簿。\n\n請按 Win+X 開啟「終端機(系統管理員)」,貼上執行後再重新啟動本程式。
|
||||
已复制=已複製
|
||||
Reference in new issue
Block a user