Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to obtain logged on user. NOT GetUserName

Status
Not open for further replies.

darkman0101

Technical User
Oct 10, 2000
51
NZ
This is not the standard GetUserName question.
As far as I can tell that API will not work for me here.
You see I am running this application from Win 2000 scheduler. In scheduler you specify what user account you want to fire the application as, (much like the startup of a service)

In this case it is not the same user as that who is logged into Windows 2000. As GetUserName returns the user that is running the current thread it is not what I want here.

How can I get the logged on user without having to look in the registry under current user?

Thanks in advance

Jas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top