Go Premium for a chance to win a PS4. Enter to Win


Accessing Windows User Account

Posted on 2004-08-22
Medium Priority
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 http://support.microsoft.com/default.aspx?scid=KB;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 250 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

885 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