MAC address

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I`ve created a web application and I want to record in a table the MAC
address of the clients machines.
Where does W2K stores the MAC address of the machine ?
Is there a way to convert or record this information in a text file ?

Thanks,
 
From a command prompt, run the program "getmac". (see below, copied from
Windows Support Center). This will output the info in a table which can be
copied and pasted to a txt file. Not sure about directly recording to a txt
file. This may require coding.
Getmac
Returns the media access control (MAC) address and list of network protocols
associated with each address for all network cards in each computer, either
locally or across a network.

Syntax
getmac[.exe] [/s Computer [/u Domain\User [/p Password]]] [/fo
{TABLE|LIST|CSV}] [/nh] [/v]

Parameters
/s Computer
Specifies the name or IP address of a remote computer (do not use
backslashes). The default is the local computer.
/u Domain\User
Runs the command with the account permissions of the user specified by
User or Domain\User. The default is the permissions of the current logged on
user on the computer issuing the command.
/p Password
Specifies the password of the user account that is specified in the /u
parameter.
/fo {TABLE|LIST|CSV}
Specifies the format to use for the query output. Valid values are TABLE,
LIST, and CSV. The default format for output is TABLE.
/nh
Suppresses column header in output. Valid when the /fo parameter is set to
TABLE or CSV.
/v
Specifies that the output display verbose information.
/?
Displays help at the command prompt.
Remarks
a.. Getmac can be useful either when you want to enter the MAC address
into a network analyzer or when you need to know what protocols are
currently in use on each network adapter in a computer.
Examples
The following examples show how you can use the getmac command:

getmac /fo table /nh /v
getmac /s srvmain
getmac /s srvmain /u maindom\hiropln
getmac /s srvmain /u maindom\hiropln /p p@ssW23
getmac /s srvmain /u maindom\hiropln /p p@ssW23 /fo list /v
getmac /s srvmain /u maindom\hiropln /p p@ssW23 /fo table /nh

Formatting legend
Format Meaning
Italic Information that the user must supply
Bold Elements that the user must type exactly as shown
Ellipsis (...) Parameter that can be repeated several times in a
command line
Between brackets ([]) Optional items
Between braces ({}); choices separated by pipe (|). Example:
{even|odd} Set of choices from which the user must choose only one
Courier font Code or program output
 
Stanley Jones said:
From a command prompt, run the program "getmac". (see below, copied from
Windows Support Center). This will output the info in a table which can be
copied and pasted to a txt file. Not sure about directly recording to a
txt file. This may require coding.

getmac > c:\output.txt - replace or create file
getmac >> c:\output.txt - append to file

Matt
MCT, MCSE
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top