Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    1

    Unhappy Unanswered: VB 6 <- Retrieving "Login Name" from SOMEWHERE... preferably a string

    my senior year i took programming
    i'm working on a program that requires the username of windows for a directory issue. every time i try the registry it uses "SYSTEM" as the name, this is getting on my nerves so i decided to ask someone who knows what the heck they're doing. all i need is to get the current user name (e.g. "John Abbot") from the start menu into a variable such as winusername$

    in short...
    Login Name (of current user)---> winusername$ (the string for the program to use)

    thanks for everything ahead of time
    your pal
    jimmy jimmy

  2. #2
    Join Date
    May 2004
    Posts
    97
    Wouldn't you use HKLM > Network > Logon > Username?

  3. #3
    Join Date
    Nov 2004
    Posts
    1

    Thumbs up Good Question

    Unfortunately i don't know the answer, HKLM is something i don't really understand i get the network > logon > username part but where do i start?
    Last edited by SaveThis55; 11-09-04 at 16:42.

  4. #4
    Join Date
    May 2004
    Posts
    97
    Try reading this...

    http://www.windowsdevcenter.com/pub/...ry_Values.html

    It has code samples for reading the computers registry. The key you want to read is:

    HKEY_LOCAL_MACHINE > network > login > username

Posting Permissions

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