createprocessasuser

Windows C# Is there a way to create a new process with the Kerberos ticket of parent process?

元气小坏坏 提交于 2019-12-11 08:47:10
问题 I'm able to create a new process via CreateProcessAsUser from code I found here: https://odetocode.com/blogs/scott/archive/2004/10/28/createprocessasuser.aspx It works fine, but the new process does not contain the Kerberos ticket of the new user which was impersonated by IIS Asp.net Impersonation. I know IIS has the Kerberos ticket, I just don't know programmatic how to get it from from the parent worker process to the new process I spawn which invokes OpenSSH. Edit: Updated Impersonation

How to launch an elevated process in a logon user session from a local service?

让人想犯罪 __ 提交于 2019-12-11 02:01:15
问题 I need to launch an elevated process in an interactive logon user session from my local service. For that I use the code very similar to this one. But I'm not sure how to specify elevation in the user token returned by WTSQueryUserToken API, and to make it work on Windows XP and up? 来源: https://stackoverflow.com/questions/38429078/how-to-launch-an-elevated-process-in-a-logon-user-session-from-a-local-service

CreateProcessAsUser - Error 1305

别说谁变了你拦得住时间么 提交于 2019-12-08 13:01:54
问题 I have service and I need to run gui application with current user priveleges from this service. This is my code and it always returns GetLastError with 1305 CreateProcessAsUser fucntion. How I can fix it or may be my code isn't right and you can advice me something useful. Thx. void ConnectionManager::LaunchDialer () { HANDLE currentToken; HANDLE primaryToken; int dwSessionId = 0; PHANDLE hUserToken = 0; PHANDLE hTokenDup = 0; PWTS_SESSION_INFO pSessionInfo = 0; DWORD dwCount = 0; // Get the

CreateProcessAsUser doesn't draw the GUI

微笑、不失礼 提交于 2019-12-08 02:03:55
问题 I have a windows service running under "SYSTEM" account that checks if a specific application is running for each logged in user. If the application is not running, the service starts it (under corresponding user name). I'm trying to accomplish my goal using CreateProcessAsUser(). The service does start the application under corresponding user name, but the GUI is not drawn. (Yes, I'm making sure that "Allow service to interact with desktop" check box is enabled). System: XP SP3, language: C#

Delphi and CreateProcessAsUser example?

心不动则不痛 提交于 2019-12-07 14:20:18
问题 Does anyone have an example of how to use CreateProcessAsUser in Delphi? I'm using Delphi 2009, not the .NET Delphi. 回答1: Look at CreateProcAsUser in JclMiscel unit from JCL library You can use it as easier solution, or you on inspect the code to get how the original one works. 回答2: Being a Win32 API function, CreateProcessAsUser works the same way in all languages. Have you tried Google Code Search? One of the matches is this one. 来源: https://stackoverflow.com/questions/2746053/delphi-and

Get Window Station for a non-interactive user per process, user or session?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 13:35:53
问题 When using CreateProcessAsUser we pass STARTUPINFO and with lpDesktop NULL, the target is winsta0/default, the interactive desktop of the interactive user. I wish to target a window station in another session of a second, non-interactive user, say a remote desktop user. I assume that it can't be winsta0 because that's reserved for the single interactive user. I am looking at the function list here: http://msdn.microsoft.com/en-us/library/ms687107(v=VS.85).aspx I can enumerate window stations

CreateProecssAsUser elevated privilege?

南笙酒味 提交于 2019-12-06 09:28:52
问题 I'm getting an error with my CreateProcessAsUser function. It says "The requested operation requires elevation. " I thought i had given it the highest privilege i could. Anyone help? thanks My code is as follows: activeSessionId = WTSGetActiveConsoleSessionId();//get the currently logged on user's active session id hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );//take snapshot of all processes in The system pe32.dwSize = sizeof(PROCESSENTRY32); Process32First(hProcessSnap,

Delphi and CreateProcessAsUser example?

梦想的初衷 提交于 2019-12-06 03:30:55
Does anyone have an example of how to use CreateProcessAsUser in Delphi? I'm using Delphi 2009, not the .NET Delphi. Look at CreateProcAsUser in JclMiscel unit from JCL library You can use it as easier solution, or you on inspect the code to get how the original one works. Being a Win32 API function, CreateProcessAsUser works the same way in all languages. Have you tried Google Code Search ? One of the matches is this one . 来源: https://stackoverflow.com/questions/2746053/delphi-and-createprocessasuser-example

Using a vb.net application running as SYSTEM, how do I start a detached process for each logged on user?

天大地大妈咪最大 提交于 2019-12-05 18:49:37
After weeks of research on this topic I've finally decided to start a thread of my own in hope there is someone out there with experience that can help. I've scoured the internet trying to understand the various coding examples out there, but I've come up short trying to put a working solution together. Let me start with some background-- Background: I have a vb.net application that is getting delivered to Windows Servers and PCs in my organization using CA IT Client Manager (ITCM). Much like Microsoft SCCM, CA ITCM has an agent service running as SYSTEM on each PC. Hence, when my application

Run application on Win7 logon screen [duplicate]

可紊 提交于 2019-12-05 02:12:56
问题 This question already has answers here : Updated: Interacting with the user on the windows logon screen (3 answers) Closed 3 years ago . I'd like to run an application on the logon screen of Windows 7 from a service. I've been doing long researches on this and trying out different ways already, but unfortunately wasn't fully successful so far. I managed to run the application on the lock screen of a currently logged on user - which at first looked to me as it was what I basically tried to