Revert "Fix/printer printable area (#12433)" (#12441)

This reverts commit 6e62c10fa0.
This commit is contained in:
RustDesk
2025-07-28 10:38:19 +08:00
committed by GitHub
parent 6e62c10fa0
commit e9692b94ca
4 changed files with 10 additions and 31 deletions

View File

@@ -765,16 +765,6 @@ 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)) {

View File

@@ -49,15 +49,6 @@ bool MyCreateServiceW(LPCWSTR serviceName, LPCWSTR displayName, LPCWSTR binaryPa
WcaLog(LOGMSG_STANDARD, "Service installed successfully\n");
}
SERVICE_DELAYED_AUTO_START_INFO delayedStart = { TRUE };
if (!ChangeServiceConfig2W(
schService,
SERVICE_CONFIG_DELAYED_AUTO_START_INFO,
&delayedStart
)) {
WcaLog(LOGMSG_STANDARD, "Failed to configure delayed auto-start for service: %ls, Error: %d\n", serviceName, GetLastError());
}
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
return true;