Fix/printer printable area (#12433)

* fix: printer, printable area

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: windows, sc config RustDesk --start= delayed-auto

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-07-27 19:47:23 +08:00
committed by GitHub
parent 52bfc02eea
commit 6e62c10fa0
4 changed files with 31 additions and 10 deletions

View File

@@ -765,6 +765,16 @@ void TryCreateStartServiceByShell(LPWSTR svcName, LPWSTR svcBinary, LPWSTR szSvc
WcaLog(LOGMSG_STANDARD, "Service \"%ls\" is created with shell.", svcName);
}
hr = StringCchPrintfW(szCmd, cchCmd, L"/c sc config %ls start= delayed-auto", svcName);
if (FAILED(hr)) {
WcaLog(LOGMSG_STANDARD, "Failed to format delayed auto-start command for service: %ls, HRESULT: 0x%08X", svcName, hr);
} else {
hi = ShellExecuteW(NULL, L"open", L"cmd.exe", szCmd, NULL, SW_HIDE);
if ((int)hi <= 32) {
WcaLog(LOGMSG_STANDARD, "Failed to configure delayed auto-start for service with shell: %d, last error: 0x%08X.", (int)hi, GetLastError());
}
}
// Query and log if the service is running.
for (int k = 0; k < 10; ++k) {
if (!QueryServiceStatusExW(svcName, &svcStatus)) {