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!

Who is logged on

Status
Not open for further replies.

labnotes

Technical User
Joined
Sep 1, 2003
Messages
33
Location
CA
I need to have a C program run on a PC that will among other things find who is logged on. I can manually type whoami at the command line to find this. How can C do it?
 
there is no whoami command in Windows

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
you can #include<windows.h> and use GetUserNameEx or GetUserName

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top