----^--->
/\

//\\
//The\
/Sy
stem\
////
Guard
\

In the mount of the LORD it shall be seen. Genesis 22:14

GetMac

Booming Or Fuming? | MasterCatalog | ntlib (FREE) | NTCmdLib | MtCmds | Scripts | Almost Free | TheGuardBook | Help

 

Types of
.Mount/\Commands

.CrystalClear | .ExactName | .ExitELn | .GetValue | .ifCondition | .ifELn | .IsPattern | .ListValue | .NetValue | .NowValue | .RedirRapids | .ReliableReporting | .RestoreValue | .SetELn | .ValueEcho

.GetValue
Series

  .GetCD | .GetDate | GetDirSize | GetDirSizeM | GetFree | GetFreeM | GetIPAddr | GetIPGateway | GetIPMask | GetLogDate | GetLogTime | GetLogTimeP | GetMac | GetNic | GetOS | GetRole | GetTempFile | GetTime | GetTimeP

.GetMac

Description

  1. Displays the current MAC (hardware) Address
  2. Saves the value in #mac
  3. Sets errorlevel based on the result

Syntax

%.GetMac%    

Parameters and Switches

none

   

Errorlevels and Output Variables

Display to
STDOUT

 

Value of
#mac

 

Error
Level

  Description of Result

AB-CD-EF-01-23-45

 

AB-CD-EF-01-23-45

 

0

  A single MAC Address was found

None

 

None

 

1

  No MAC Address was found

Multi

 

Multi

 

2

  Multiple MAC Addresses were found (see .ListMac)

Examples, Notes and Instructions

NT
2K
XP
K3
C:\GuardPost>%.GetMac%
AB-CD-EF-01-23-45

C:\GuardPost>ECHO:%Errorlevel%
0

C:\GuardPost>SET #mac
#Mac=AB-CD-EF-01-23-45

C:\GuardPost>

  • Output is displayed to STDOUT
  • To suppress console display, use

    %.GetMac% %.Quiet%

{errorlevel and output variable(s) will still be available}

  • To remove dashes use

        SET #mac=%#mac:-=%


.GetValue
Series

  .GetCD | .GetDate | GetDirSize | GetDirSizeM | GetFree | GetFreeM | GetIPAddr | GetIPGateway | GetIPMask | GetLogDate | GetLogTime | GetLogTimeP | GetMac | GetNic | GetOS | GetRole | GetTempFile | GetTime | GetTimeP

Related .Mount/\Commands, #Constants, $Functions, :Procedures

Resource

  Short Description
#mac   MAC (Hardware) address in xx-xx-xx-xx-xx-xx format

 

K

E

Y

Common Commands INTERNAL External /SWITCH Parameter Help text AddonTool
Mounted Commands .Mount/\Command CmdShorthand #Constant $FUNCTION :Procedure !GuardNote
Operating Systems NT/2K/XP/K3 NT Only NT/2K 2K Only 2K/XP XP Only XP/K3 K3 Only 2K/XP/K3
/\
//\\
//
The\
/Sy
stem\
////
Guard
\
COME ON UP WITH US!
and
Congratulations On Your Decision
to
RISE ABOVE
THE REST!

^
/
!\
/LIB\

TheSystemGuard.com [Revised: 2007-03-29]
Copyright © 1995-2007, JWC
Computer Communications,
All Rights Reserved, Worldwide.
 Disclaimer       Privacy       About Us       More


Communication Is Business!

We Master It With Knowledge!

^
/
.\
/M^C\