Alpha Video Training
Results 1 to 10 of 10

Thread: obtaining network physical address

  1. #1
    Guest
    Real Name
    William K. Lucas
    Join Date
    May 2000
    Posts
    90

    Default obtaining network physical address

    Is it possible in alpha5v5 to obtain the network physical address of a computer. I want to track changes to employee database. I want to know who made the changes and from which computer. The only thing that a user can't change on a comupter is the network physical address. The user can change his computer name or they can login as somebody else.
    Thanks
    Willie

  2. #2
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default RE: obtaining network physical address

    I sometimes use a program I found on the alpha board.
    I thingk alan sawyer wrote the visual basic program.
    run it and it gives the computer name,username and ip address.
    It writes these to 3 text files.
    these text files can be imported into a alpha table and then posted to the current record.

    charlie crimmel

  3. #3
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default RE: obtaining network physical address

    forgot to attach the file

  4. #4
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,699

    Default RE: obtaining network physical address

    Willie,

    First a warning: they can change their physical address. It's not as easy as logging in as someone else or changing their IP address so most users can't do it, but it is possible.

    There is no function built-in to Alpha Five to get the physical address of the network adapter. Below is a quick and dirty function to get the physical network address. If the computer this is run on has multiple network interfaces, it will return the last one listed.

    Code:
    function get_mac as c()
        bat =  c:\mac.txt
    %str%
        save_to_file(bat,"c:\mac.bat")
        sleep(1)
        sys_shell("c:\mac.bat")
        sleep(1)
        mac = get_from_file("c:\mac.txt")
       
        for i = 1 to line_count(mac)
            if left(ltrim(word(mac,i,crlf())),16) = "Physical Address" then
                get_mac = alltrim(word(word(mac,i,crlf()),2,":"))
            end if
        next i
        file.remove("c:\mac.bat")
        file.remove("c:\mac.txt")
    end function
    -Lenny

  5. #5
    VAR
    Real Name
    John Lemisch
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    673

    Default RE: obtaining network physical address

    Charlie:
    could you post a getuser.zip file that is not password protected? I wanted to look at it. Thanks

  6. #6
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,699

    Default RE: obtaining network physical address

    As listed on the Code Archive board, the password is getuser

    -Lenny

  7. #7
    Member
    Real Name
    Jack Wheeler
    Join Date
    Apr 2000
    Posts
    570

    Default RE: obtaining network physical address

    Lenny, nice little piece of code.

  8. #8
    Guest
    Real Name
    William K. Lucas
    Join Date
    May 2000
    Posts
    90

    Default RE: obtaining network physical address

    Thanks Guys
    This will work perfect. Since I write down every computer physical network address and location on the premise and if they do change the pysical address that will give them away because it will not be in my database and will not let them in the employee database.
    Thanks
    Willie

  9. #9
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,699

    Default RE: obtaining network physical address

    I forgot to mention that this works on XP, 2000, NT 4, ME and 98 but not on 95. Since A5V5 is not supported in Win95 anyway, that shouldn't be an issue, but I figured I should mention it just in case.

    -Lenny

  10. #10
    Jamin Dunivan
    Guest

    Default RE: obtaining network physical address

    On Win 98 you can use "winipcfg /batch [filename]". This will create a file with your network adapter info. THen you just have to parse the file.

    2000 and XP use ipconfig but I am not sure if it does the same thing.

Similar Threads

  1. Same as address
    By rlgiordano in forum Web Application Server v6
    Replies: 2
    Last Post: 04-10-2005, 02:41 PM
  2. PIM or address book
    By Bobby Dally in forum Alpha Five Version 4
    Replies: 2
    Last Post: 11-08-2002, 06:25 AM
  3. Obtaining Printer Codes
    By Walt Barrett in forum Alpha Four Version 6 and Prior
    Replies: 3
    Last Post: 07-16-2002, 09:25 PM
  4. Getting an IP Address
    By Steven Devaney in forum Alpha Five Version 4
    Replies: 23
    Last Post: 02-24-2002, 05:25 AM
  5. Mailing address vs. Street Address
    By Eugene Volz in forum Alpha Five Versions 2 and 3
    Replies: 1
    Last Post: 12-19-2001, 12:15 PM

Bookmarks

Posting Permissions

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