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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the active dircetory

Status
Not open for further replies.

snowei1

Programmer
Feb 20, 2004
6
SG
I want to get the username and domain when a user login to a PC. This one has to be get at the window login page. So I may check if they can have certain access. How can I do that?
 
on boot of windows, maybe have a program launch and check the current logged in user and domain for that user.
 
Now I want to change to the program have a login page asking for username and password.I want to get the username from the program and compare it with the domain which is used to login to window.if the user is not in that domain, then they will not be able to access the program.
please provide sample code if possible.
thanks
 
A bit more information may be needed!

Like operating system details

On the face of it maybe the GetUserNameEx api call may do what you require, but it is only available for Windows 2000 or XP.


Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
why not just set the security on the application to include only a certain group of users on the domain...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top