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

@@ -43,7 +43,9 @@ public:
char buf[16] = {};
sprintf_s(buf, "%d", GetCurrentProcessId());
instance.pid = buf;
instance.InitLogFile("C:\\Windows\\Temp", instance.pid);
char logPath[MAX_PATH] = { 0 };
GetEnvironmentVariableA("TEMP", logPath, MAX_PATH);
instance.InitLogFile(logPath, instance.pid);
#ifdef _WINDOWS
instance.enable = true; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־Ĭ<D6BE>ϴ<EFBFBD><CFB4><EFBFBD>
#else