Get the the current user name under NT
Posted on 2001-06-22
I run a program with the scheduler (the AT command at the DOS prompt) that needs to know the username of the currently logged on user. Since the scheduler is a service, all I can get as a username is "SYSTEM".
Would anyone know how to get this info?
I did find some information in the registry under HKEY_LOCAL_MACHINE\system\currentcontrolset\control\hivelist but there is probably an easier and more proper way to get it.