Computing.Net > Forums > Disk Operating System > MAC address utility for DOS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

MAC address utility for DOS

Reply to Message Icon

Name: John Carls
Date: December 29, 2000 at 00:05:33 Pacific
Comment:

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?



Sponsored Link
Ads by Google

Response Number 1
Name: Rich
Date: May 3, 2001 at 14:36:32 Pacific
Reply:

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 squirrel

MD C:\WIDESCAN

TYPE WIDESCAN.BAT>c:\widescan\widescan.bat

C:
CD\WIDESCAN

:squirrel

C:
CD\WIDESCAN

IF "%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%%j

SET FILEY=%1%DATTY%%TIMMY%

NET VIEW /DOMAIN:%1 > c:\widescan\DOMLIST.TXT

ECHO .
ECHO Extracting machine names from the list...
TITLE Processing list from %1

IF EXIST c:\widescan\DOMMACH.TXT DEL c:\widescan\DOMMACH.TXT

ECHO .
ECHO Hitting them with PING and NBTSTAT commands...
TITLE Scanning %1

FOR /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>NUL

COLOR 0F

DEL c:\widescan\TIMEEEE.TXT
DEL c:\widescan\DATEEEE.TXT
DEL c:\widescan\DOMLIST.TXT
DEL c:\widescan\DOMMACH.TXT

ECHO .
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


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: MAC address utility for DOS

COPY DOS utility for USB port www.computing.net/answers/dos/copy-dos-utility-for-usb-port/11736.html

Norton Utilities for DOS - Last Version www.computing.net/answers/dos/norton-utilities-for-dos-last-version/6089.html

Get the MAC address of a NIC in DOS www.computing.net/answers/dos/get-the-mac-address-of-a-nic-in-dos/14196.html