How to Create Admin Accounts Using VB.net

SOLVED Discussion in 'Web Design & Coding' started by Comptech, Dec 12, 2011.

  1. Comptech

    Comptech ICT Technican

    Joined:
    Dec 11, 2011
    Messages:
    16
    Location:
    UK
    How to create Administrator Accounts Using VB.net

    you will need 2 textboxes leave them as default name

    1 Button

    2 Lables

    Label 1 Stating Username
    Label 2 stating Password

    Textbox 1 as username
    Textbox 2 as Password

    set textbox to use system password char

    the following peace of code will add the account as administrator and set a password for that account

    Code Under Button 1;

    On Error Resume Next[FONT=&quot]
    [/FONT] Shell("net user " & TextBox1.Text & " /add")[FONT=&quot]
    [/FONT] Shell("Net user " & TextBox1.Text & " " & TextBox2.Text)[FONT=&quot]
    [/FONT] Shell("net localgroup administrators " & TextBox1.Text & " /add")[FONT=&quot]
    [/FONT] MsgBox("The new user," & TextBox1.Text & ",has been created!", MsgBoxStyle.Information, "Info")[FONT=&quot]
    [/FONT] End Sub

    Hope this helps someone

    Kind Regards

    Bradley
     
    Last edited: Dec 12, 2011
    Comptech, Dec 12, 2011
    #1
    unlock phone and Zeus like this.
    1. Advertisements

  2. Comptech

    AceInfinity Somewhere...

    Joined:
    Aug 13, 2012
    Messages:
    7
    Location:
    Canada
    If you continually use Shell() then you're becoming less reliant on the BCL. This is more like provoking another executable to start, and do all the work for you, which is not entirely recommended.

    I know these are somewhat old threads, but i'll point that out for anybody's future reference.
     
    AceInfinity, Aug 13, 2012
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James

    Top 10 Admin & Security tips

    James, Jun 10, 2003, in forum: System Security & Infection Support
    Replies:
    0
    Views:
    1,748
    James
    Jun 10, 2003
  2. SandPetal

    Admin help in forum

    SandPetal, Aug 29, 2003, in forum: Software
    Replies:
    1
    Views:
    788
    James
    Aug 29, 2003
  3. waverocker

    .Net Passport Accounts

    waverocker, Sep 28, 2004, in forum: Software
    Replies:
    4
    Views:
    1,052
    waverocker
    Sep 28, 2004
  4. Rod Speed
    Replies:
    3
    Views:
    394
    Rod Speed
    Feb 8, 2006
  5. J
    Replies:
    1
    Views:
    323
    amosf © Tim Fairchild
    Feb 8, 2006
  6. Nick O'Tyme
    Replies:
    0
    Views:
    1,505
    Nick O'Tyme
    Feb 19, 2008
  7. RayLopez99
    Replies:
    15
    Views:
    458
  8. Comptech

    SOLVED How to Load a Website Using VB.net

    Comptech, Dec 11, 2011, in forum: Web Design & Coding
    Replies:
    0
    Views:
    701
    Comptech
    Dec 11, 2011
Loading...