CreateProcessWithLogonW后,第二个应用程序不采取凭据

我怎样才能创build一个进程(a.exe)使用CreateProcessWithLogonW是实时的(请注意,我不是一个pipe理员用户,但我使用的CreateProcessWithLogonW是admin),并从一个启动另一个进程(b.exe)。使用CreateProcess EXE并有实时吗?

这里是启动a.exe的代码:

PROCESS_INFORMATION pi = { 0 }; STARTUPINFO si = { 0 }; if (!CreateProcessWithLogonW(argv[1], argv[2], argv[3], LOGON_NETCREDENTIALS_ONLY, NULL, _T("a.exe"), REALTIME_PRIORITY_CLASS, NULL, NULL, &si, &pi)) { cout << "Error!!!!\n"; } 

这里是从a.exe启动b.exe的代码:

 SECURITY_ATTRIBUTES security_att; STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory(&security_att, sizeof(security_att)); security_att.nLength = sizeof (SECURITY_ATTRIBUTES); security_att.bInheritHandle = TRUE; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_NORMAL; if(!CreateProcess(NULL, "b.exe", &security_att, &security_att, FALSE, REALTIME_PRIORITY_CLASS, NULL, NULL, &si, &pi)) { cout << "Error!!!!\n"; } 

目前,a.exe将是实时优先,但b.exe只是高优先级。