Fix: TestRun run as windows service can't unlock screen

This commit is contained in:
shaun
2025-12-29 17:54:47 +01:00
committed by yuanyuanxiang
parent 4ae97abcc6
commit 2b4f061f82
13 changed files with 92 additions and 26 deletions

View File

@@ -239,7 +239,11 @@ BOOL LaunchAsAdmin(const char* szFilePath, const char* verb)
BOOL CMy2015RemoteApp::InitInstance()
{
#if _DEBUG
BOOL runNormal = TRUE;
#else
BOOL runNormal = THIS_CFG.GetInt("settings", "RunNormal", 0);
#endif
char curFile[MAX_PATH] = { 0 };
GetModuleFileNameA(NULL, curFile, MAX_PATH);
if (!runNormal && !IsRunningAsAdmin() && LaunchAsAdmin(curFile, "runas")) {