Results 1 to 10 of 10
  1. #1
    wut12345's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    294
    Reputation
    16
    Thanks
    1,453

    Lightbulb How to get the username of the computer

    I never saw this yet so I've posted it here.




    First you need a Directory\Whatever you need for.

    Code:
    C:\Users\UserName\Documents
    like this.^

    Now we'll do this.
    |
    V

    Remove the () around the "IO"
    Code:
    If System.(IO).Directory.Exists("C:\Users" + "\" + Environment.UserName + "\" + "Documents") = True Then
                'Your Code here
            Else
                'Your Code here
            End If
    Or if you want to print it to a label\textbox\button

    Code:
    label.text = Environment.UserName 
    textbox.text = Environment.UserName 
    button.text = Environment.UserName

  2. #2
    Raow's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    47°37′39″N 122°14′32″W
    Posts
    2,720
    Reputation
    140
    Thanks
    594
    Quote Originally Posted by wut12345 View Post
    I never saw this yet so I've posted it here.




    First you need a Directory\Whatever you need for.

    Code:
    C:\Users\UserName\Documents
    like this.^

    Now we'll do this.
    |
    V

    Remove the () around the "IO"
    Code:
    If System.(IO).Directory.Exists("C:\Users" + "\" + Environment.UserName + "\" + "Documents") = True Then
                'Your Code here
            Else
                'Your Code here
            End If
    Or if you want to print it to a label\textbox\button

    Code:
    label.text = Environment.UserName 
    textbox.text = Environment.UserName 
    button.text = Environment.UserName
    This is not a tutorial.
    I'd suggest posting in the Snippet thread which can be found: https://www.mpgh.net/forum/33-visual-...ets-vault.html

  3. #3
    Threadstarter
    Dual-Keyboard Member
    MPGH Member
    wut12345's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    294
    Reputation
    16
    Thanks
    1,453
    Quote Originally Posted by raow25 View Post
    This is not a tutorial.
    I'd suggest posting in the Snippet thread which can be found: https://www.mpgh.net/forum/33-visual-...ets-vault.html
    Yeah true.

  4. #4
    Tyler022-'s Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by wut12345 View Post
    I never saw this yet so I've posted it here.




    First you need a Directory\Whatever you need for.

    Code:
    C:\Users\UserName\Documents
    like this.^

    Now we'll do this.
    |
    V

    Remove the () around the "IO"
    Code:
    If System.(IO).Directory.Exists("C:\Users" + "\" + Environment.UserName + "\" + "Documents") = True Then
                'Your Code here
            Else
                'Your Code here
            End If
    Or if you want to print it to a label\textbox\button

    Code:
    label.text = Environment.UserName 
    textbox.text = Environment.UserName 
    button.text = Environment.UserName
    Or you could use this
    Code:
    SystemInformation.UserName

  5. #5
    tynab's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Posts
    382
    Reputation
    10
    Thanks
    1,167
    My Mood
    Blah
    nice but it's too long

    New Windows 8 Injector!
    Newest Windows 8 Injector (Fast and very X-Mas) !
    My web browser for computer . Selling how to make that for 30 $ or less


  6. #6
    lucasheer715's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    648
    Reputation
    10
    Thanks
    497
    My Mood
    Bored
    i got another way lol

  7. #7
    Threadstarter
    Dual-Keyboard Member
    MPGH Member
    wut12345's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    294
    Reputation
    16
    Thanks
    1,453
    Quote Originally Posted by lucasheer715 View Post
    i got another way lol
    Watch out!

  8. #8
    lucasheer715's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    648
    Reputation
    10
    Thanks
    497
    My Mood
    Bored
    Quote Originally Posted by wut12345 View Post
    Watch out!
    lol, i remember you you told me to delete system32

  9. #9
    Threadstarter
    Dual-Keyboard Member
    MPGH Member
    wut12345's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    294
    Reputation
    16
    Thanks
    1,453
    Quote Originally Posted by lucasheer715 View Post
    lol, i remember you you told me to delete system32
    And got banned for 2 days for "Nice Troll code"

  10. #10
    lucasheer715's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    648
    Reputation
    10
    Thanks
    497
    My Mood
    Bored
    Quote Originally Posted by wut12345 View Post
    And got banned for 2 days for "Nice Troll code"
    Why did you get banned? I didnt complain... it made me laugh

Similar Threads

  1. How to get a mod from the SERVER?
    By liwei8257 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 11
    Last Post: 06-23-2011, 06:21 AM
  2. How to get less recoil(not the stupid script thing)
    By linuxandmegasrulz in forum Combat Arms Hacks & Cheats
    Replies: 30
    Last Post: 04-23-2009, 01:59 PM
  3. [Tutorial] How to get the Wall hack to work.
    By wr194t in forum WolfTeam Hacks
    Replies: 38
    Last Post: 03-01-2008, 02:52 AM
  4. [TuT] How To Get The New Weapons!
    By Jeffrey1993 in forum WarRock - International Hacks
    Replies: 18
    Last Post: 07-26-2007, 01:28 AM
  5. How to get rid of the Bush
    By arunforce in forum General
    Replies: 0
    Last Post: 07-05-2007, 01:21 AM

Tags for this Thread