Jwscl implementiert
JwCreateProcessInSession
Die aktualisierte Version im
SVN trunk Ordner funktioniert auch unter Windows 2000 Workstation.
Delphi-Quellcode:
{[B]JwCreateProcessInSession[/B] creates a new process in a user's session using various ways to
achieve success.
This procedure needs JwInitWellKnownSIDs to be called.
To run a process in another session you need to have SYSTEM rights.
@param ApplicationName defines the application to be run in the session
@param CommandLine defines the parameters for the application
@param CurrentDirectory defines the start folder of the app.
@param SessionID defines the target session where the new application is to be started.
@param CreationFlags defines creation flags that are delivered to CreateProcess parameter with
same name
@param Desktop defines the target windowstation and desktop name. If empty
the default target is "winsta0\default"
@param StartupInfo defines startup info delivered to to CreateProcess parameter with
same name. Don't forget to initialize the structure first before calling this procedure.
<code lang="delphi>
ZeroMemory(@StartupInfo, sizeof(StartupInfo));
</code>
@param WaitForProcess defines whether the procedure should wait for the process to end
and clean up all allocated resources or just return to the caller. In last case
the caller is responsible to free the returned token, the environment block and
the users profile
@param Output contains returned data in case parameter WaitForProcess is false.
The caller is responsible to free the contained member allocation
@param LogServer receives a log server instance. It is used to log events for
mostly debugging purposes. If this parameter is nil, no events are logged
raises
EJwsclProcessIdNotAvailable: will be raised if no token could be found
for the given SessionID
EJwsclNilPointer: will be raised if JwInitWellKnownSIDs was not called before
}