Results 1 to 4 of 4

Thread: can someone explain user accounts for me?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    20

    can someone explain user accounts for me?

    I have been tryin to look for a long time now..I cant figure out how to code something that will do this:

    List all the user accounts on the computer,
    change passwords on the accounts

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: can someone explain user accounts for me?

    You can list accounts using the Win32_UserAccount WMI class through the System.Management namespace. Gigemboy's signature has some useful WMI stuff. That class doesn't offer a property or method to set the password though. This isn't a big shock really. I'd not be surprised to learn that Windows doesn't offer a way to programmatically change user passwords. Letting any old application do that could be a bit dangerous.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: can someone explain user accounts for me?

    Nope, MS do provide a NetUserChangePassword API to change password's of user accounts.
    Show Appreciation. Rate Posts.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: can someone explain user accounts for me?

    I agree that it's dangerous and I've always wondered why it exists at all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width