JCL Help:CreateProcAsUser

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Spawns a new process in the context of the specified user account.


Pascal

 procedure CreateProcAsUser(const UserDomain: string; const UserName: string; const PassWord: string; const CommandLine: string);


Parameters

Parameters Description
const UserDomain: string Name of the domain the user account is contained in. If this parameter is '.', then the procedure will search only the local account database to look up the user account. If the parameter is nil, then the procedure will first search the local account database and then the trusted domain account databases until the specified account is found.
const UserName: string The name of the user account the new process is to be run in.
const PassWord: string The password for the specified user account.
const CommandLine: string This string specifies the command line for the application to be executed.


Description

CreateProcessAsUserEx launches a new process in the context of the specified user. This user does not neccessarily have to be the same user as the currently logged in user. You can use this function to run a child process in an adminstrative context, although the calling process is running in a normal (i.e.:restricted) user context.


See Also

CreateProcAsUserEx CreateEnvironmentBlock


About

Unit

JclMiscel


Donator

Peter Friese


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page