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
@@ -2252,3 +2252,8 @@ APK
|
||||
这个 APK 里没有找到本主控的标识,装上去很可能连不回本服务器。\n\n请确认它是「生成客户端 → 安卓」导出的包,并且已经用 android/sign_apk.bat 重新签名(未重签的包签名对不上,系统会拒绝覆盖安装)。\n\n文件:\n%s\n\n仍然下发吗?=Dieses APK enthaelt keine Kennung dieses Masters; nach der Installation kann es sich sehr wahrscheinlich nicht mit diesem Server verbinden.\n\nStellen Sie sicher, dass es ueber "Client erstellen -> Android" exportiert und mit android/sign_apk.bat neu signiert wurde (ein nicht neu signiertes Paket behaelt die alte Signatur, und das System verweigert die Neuinstallation).\n\nDatei:\n%s\n\nTrotzdem senden?
|
||||
APK 已下发。\n\n接下来的操作需要在设备上完成:\n1. 若没弹出安装框,可能是系统未授权「安装未知应用」——在设备的应用设置里给 YAMA 打开;\n2. 点「安装」确认覆盖安装;\n3. 安装完成后打开 YAMA,重新授权录屏(升级后授权一定会失效)。=Das APK wurde gesendet.\n\nDie restlichen Schritte muessen am Geraet ausgefuehrt werden:\n1. Erscheint kein Installationsdialog, ist "Unbekannte Apps installieren" fuer YAMA vermutlich nicht erlaubt - in den App-Einstellungen des Geraets aktivieren;\n2. Auf "Installieren" tippen, um die Neuinstallation zu bestaetigen;\n3. Nach der Installation YAMA oeffnen und die Bildschirmaufnahme erneut erlauben (die Berechtigung geht bei jedem Update verloren).
|
||||
确认=Bestaetigen
|
||||
; === 完整性级别自检(Low Integrity 提示) ===
|
||||
本程序运行在「低完整性」模式下,部分功能会异常。\n\n请以管理员身份打开命令提示符,执行:\n\n %s\n\n执行后重新启动本程序。\n\n点「是」复制上面的命令,点「否」关闭。=Dieses Programm laeuft mit niedriger Integritaetsstufe, daher funktionieren einige Funktionen nicht ordnungsgemaess.\n\nOeffnen Sie eine Eingabeaufforderung als Administrator und fuehren Sie aus:\n\n %s\n\nStarten Sie danach das Programm neu.\n\nJa kopiert den Befehl, Nein schliesst das Fenster.
|
||||
完整性级别受限=Integritaetsstufe eingeschraenkt
|
||||
修复命令已复制到剪贴板。\n\n请按 Win+X 打开「终端(管理员)」,粘贴执行后再重新启动本程序。=Der Reparaturbefehl wurde in die Zwischenablage kopiert.\n\nDruecken Sie Win+X, oeffnen Sie Terminal (Administrator), fuegen Sie den Befehl ein und starten Sie das Programm danach neu.
|
||||
已复制=Kopiert
|
||||
@@ -2264,3 +2264,8 @@ APK
|
||||
这个 APK 里没有找到本主控的标识,装上去很可能连不回本服务器。\n\n请确认它是「生成客户端 → 安卓」导出的包,并且已经用 android/sign_apk.bat 重新签名(未重签的包签名对不上,系统会拒绝覆盖安装)。\n\n文件:\n%s\n\n仍然下发吗?=This APK does not contain the identifier of this master, so once installed it very likely cannot connect back to this server.\n\nMake sure it was exported by "Build Client -> Android" and re-signed with android/sign_apk.bat (a package that was not re-signed keeps the old signature and the system will refuse to overwrite the installed app).\n\nFile:\n%s\n\nSend anyway?
|
||||
APK 已下发。\n\n接下来的操作需要在设备上完成:\n1. 若没弹出安装框,可能是系统未授权「安装未知应用」——在设备的应用设置里给 YAMA 打开;\n2. 点「安装」确认覆盖安装;\n3. 安装完成后打开 YAMA,重新授权录屏(升级后授权一定会失效)。=The APK has been sent.\n\nThe remaining steps must be done on the device:\n1. If no installer dialog appears, the system may not allow "install unknown apps" - enable it for YAMA in the device's app settings;\n2. Tap "Install" to confirm the overwrite install;\n3. After installing, open YAMA and grant screen capture again (the grant is always lost after an upgrade).
|
||||
确认=Confirm
|
||||
; === 完整性级别自检(Low Integrity 提示) ===
|
||||
本程序运行在「低完整性」模式下,部分功能会异常。\n\n请以管理员身份打开命令提示符,执行:\n\n %s\n\n执行后重新启动本程序。\n\n点「是」复制上面的命令,点「否」关闭。=This program is running at Low integrity, so some features will not work properly.\n\nOpen a command prompt as administrator and run:\n\n %s\n\nThen restart this program.\n\nClick Yes to copy the command, No to close.
|
||||
完整性级别受限=Integrity Level Restricted
|
||||
修复命令已复制到剪贴板。\n\n请按 Win+X 打开「终端(管理员)」,粘贴执行后再重新启动本程序。=The fix command has been copied to the clipboard.\n\nPress Win+X to open Terminal (Admin), paste and run it, then restart this program.
|
||||
已复制=Copied
|
||||
@@ -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