JCL Help:GetInteractiveUserName
JCL Help: GetInteractiveUserName Function
Search in JCL Help
Search in all projects
Summary
Returns the name of the interactive user.
Pascal
function GetInteractiveUserName: string;
Return Value
The name of the interactively logged on user, if any, in the format domainusername.
Description
Returns the name of the interactive user (if any) in the form <username>. If the function fails it raises and exception (also true when the shell is not running, ie no user is interactively logged on). This function, unlike the much easier GetUserName, can be called from a service running in the localsystem security context. It can not be called from a service running in another security context unless appropriate measures have been taken to grant the service sufficient access (PROCESS_ALL_ACCESS for the shell process and TOKEN_QUERY for the interactive user account token). That's kind of difficult to achieve so it's safe to say, don't use this function from any service accept one running in the localsystem security context.
About
Unit
Donator
Marcel van Brakel
Notes
Under Windows 95/98/Millenium Edition, this function always returns an empty string.
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