Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm a net admin. A few years back, I created a login script for Novell 3.12 that involves a mac address. No problem.
Now, a situation comes with WinNT that needs knowing the mac address of each workstation. I scrounged the internet looking for a DOS utility that I could use in the logon script so that I could duplicate what I did back then. Unfortunately, my 3-week search proved fruitless.
Can anybody tell where can I find a DOS utility that can redirect to a file the mac address of the logging workstation?

The Following Batch file will create a list from a domain use as follows
Widescan "DOMAINNAME"
It will return the following information
IP
Machine Name
Mac Address
and currently logged in user of any machine currently logged into the Domain
@echo off
IF EXIST C:\WIDESCAN\WIDESCAN.BAT GOTO squirrelMD C:\WIDESCAN
TYPE WIDESCAN.BAT>c:\widescan\widescan.bat
C:
CD\WIDESCAN:squirrel
C:
CD\WIDESCANIF "%1" == "The" GOTO REALEND
IF "%2" == "" GOTO STARTER
IF "%2" == "blah" GOTO SCRAM:STARTER
CLS
TITLE Scanning %1
COLOR e0
ECHO Building list of machines on %1@DATE /T >c:\widescan\DATEEEE.TXT
@FOR /F "tokens=2,3,4 delims=/ " %%i in (c:\widescan\DATEEEE.TXT) DO @SET DATTY=%%i%%j%%k
@TIME /T >c:\widescan\TIMEEEE.TXT
@FOR /F "tokens=1,2 delims=: " %%i in (c:\widescan\TIMEEEE.TXT) DO @SET TIMMY=%%i%%jSET FILEY=%1%DATTY%%TIMMY%
NET VIEW /DOMAIN:%1 > c:\widescan\DOMLIST.TXT
ECHO .
ECHO Extracting machine names from the list...
TITLE Processing list from %1IF EXIST c:\widescan\DOMMACH.TXT DEL c:\widescan\DOMMACH.TXT
ECHO .
ECHO Hitting them with PING and NBTSTAT commands...
TITLE Scanning %1FOR /f "skip=3 tokens=1 delims=\ " %%i in (C:\widescan\DOMLIST.TXT) do @ECHO %%i >> c:\widescan\DOMMACH.TXT
FOR /f %%i in (c:\widescan\DOMMACH.TXT) do call c:\widescan\widescan %%i blah
GOTO END
:SCRAM
TITLE Scanning %1
PING -n 1 %1 >>c:\widescan\%FILEY%.TXT
NBTSTAT -a %1 >>c:\widescan\%FILEY%.TXT
GOTO REALEND:END
IF EXIST c:\widescan\%1.TXT DEL c:\widescan\%1.TXT
COPY c:\widescan\%FILEY%.TXT c:\widescan\%1.TXT>NULCOLOR 0F
DEL c:\widescan\TIMEEEE.TXT
DEL c:\widescan\DATEEEE.TXT
DEL c:\widescan\DOMLIST.TXT
DEL c:\widescan\DOMMACH.TXTECHO .
ECHO Scan is complete. You can find the results in two identical files:
ECHO .
ECHO %1.TXT %FILEY%.TXT
ECHO .
ECHO They are in the directory C:\WIDESCAN.TITLE Command Prompt
:REALEND

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |