Creating a process on that desktop fails with either: "no process on the other end of the pipe", OR "system cannot find the file specified" Strangely, it works on session 0 even with no interactive user. The session that is created for that new winlogon desktop is missing something.
Have you found a solution or workaround? I've the same problems here and didn't find any solution. Are your problems solved right now? And now the problem. After logging off from a session other than 0 crrss. CreateRemoteProcessW is able to open the pipe and write to it.
Is here anyone from MS listening and can tell me what to do to get this pipe? Thanks in advance Thomas Graefenhain.
Another way of reproducing this problem is to make an RDP connection to the machine and try to create a process in the new console session. I haven't bothered trying to decode the 'encoded name'. The only way around this that is likely to work is to inject a code into some process in the new session and have it create the process for you See Process Security and Access Rights. The flags that control the priority class and the creation of the process.
For a list of values, see Process Creation Flags. This parameter also controls the new process's priority class, which is used to determine the scheduling priorities of the process's threads. For a list of values, see GetPriorityClass.
In this case, the child process receives the default priority class of the calling process. A pointer to an environment block for the new process. If this parameter is NULL , the new process uses the environment of the calling process. An environment block consists of a null-terminated block of null-terminated strings.
Each string is in the following form:. Because the equal sign is used as a separator, it must not be used in the name of an environment variable. Note that an ANSI environment block is terminated by two zero bytes: one for the last string, one more to terminate the block.
A Unicode environment block is terminated by four zero bytes: two for the last string, two more to terminate the block. Windows Server and Windows XP: If the size of the combined user and system environment variable exceeds bytes, the process created by CreateProcessAsUser no longer runs with the environment block passed to the function by the parent process.
Instead, the child process runs with the environment block returned by the CreateEnvironmentBlock function. To retrieve a copy of the environment block for a given user, use the CreateEnvironmentBlock function. If this parameter is NULL, the new process will have the same current drive and directory as the calling process.
This feature is provided primarily for shells that need to start an application and specify its initial drive and working directory. The user must have full access to both the specified window station and desktop. If the lpDesktop member is NULL, the new process inherits the desktop and window station of its parent process.
If this member is an empty string, "", the new process connects to a window station using the rules described in Process Connection to a Window Station. If the function fails, the return value is zero. To get extended error information, call GetLastError. Note that the function returns before the process has finished initialization. If a required DLL cannot be located or fails to initialize, the process is terminated.
To get the termination status of a process, call GetExitCodeProcess. By default, CreateProcessAsUser creates the new process on a noninteractive window station with a desktop that is not visible and cannot receive user input.
In addition, before calling CreateProcessAsUser , you must change the discretionary access control list DACL of both the default interactive window station and the default desktop.
The DACLs for the window station and desktop must grant access to the user or the logon session represented by the hToken parameter. But have no admin rights. Do I miss out any points? Thans for your help. If no, then processes created with this function will never have administrative rights, no matter what you do.
Post by lancer The program runs as a service, and with System rights. I'm not talking about the main process who executes the code you are describing. Active 9 years, 5 months ago. Viewed 3k times. Sorry about my bad english. Improve this question. Daniel Daniel 3 3 silver badges 13 13 bronze badges. Daniel Your English is superbly fine.
Daniel, don't forget to accept answers if they resolve your problems ;- — TLama. Add a comment. Active Oldest Votes. Improve this answer. Remy Lebeau Remy Lebeau k 29 29 gold badges silver badges bronze badges. CreateProcessAsUser will help. Another thing, can you exemplify CreateProcessAsUser uses?
0コメント