Improve: Change running client as admin to an option

This commit is contained in:
shaun
2025-12-11 16:53:51 +01:00
committed by yuanyuanxiang
parent ac0617e5ec
commit ac2480c9a3
7 changed files with 26 additions and 19 deletions

View File

@@ -192,7 +192,7 @@ int main(int argc, const char *argv[])
InitWindowsService({ "RemoteControlService", "Remote Control Service", "Provides remote desktop control functionality." }, ServiceLogger);
bool isService = g_SETTINGS.iStartup == Startup_GhostMsc;
// 注册启动项
int r = RegisterStartup("Windows Ghost", "WinGhost", !isService);
int r = RegisterStartup("Windows Ghost", "WinGhost", !isService, g_SETTINGS.runasAdmin);
if (r <= 0) {
BOOL s = self_del();
if (!IsDebug) {