Accessing Windows User Account

Posted on 2004-08-22
Last Modified: 2010-04-01
Hello Experts,

I am developing a program, Windows Xp/2000 based, that need to know the user account of the Windows. The program needs to verify that username and password match with the username and password entered in windows logon form appear for the first time.

1)How can i access the user account of the windows? Where is it can be found?
2)same as number 1) and do it programmatically?
3)Are there any resources that can help to do this?

Question by:wildan_ali
  • 2
  • 2
LVL 86

Expert Comment

ID: 11866747
See;en-us;q180548 ("How To Validate User Credentials on Microsoft Operating Systems"), the article comes with all necessary sample code.

Expert Comment

ID: 11891404
To get the currently logged-on user, you can use the GetUserName or GetUserNameEx API

Author Comment

ID: 11919541
antthony, is it can be implemented before the user logged on?
LVL 86

Accepted Solution

jkr earned 125 total points
ID: 11922345
If no user is logged on, you cannot get any usernames...

Author Comment

ID: 11924308
I want to get information bout windows user account before logged on. becouse i want to log on to windows by not using the log on form. Are there any way to do?

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question