Run batch file by MAC Address

July 17, 2011 at 21:09:44
Specs: Windows 7
Hi,

Im trying to write a batchfile that will only work when run on a computer with a defined MAC address.

EG:

If MAC Address = 00-0E-7B-89-C4-E0 goto... else exit or abort script.

If anyone can help with this, it would be greatly appreciated..

Kind Regards,

LEE


See More: Run batch file by MAC Address

Report •


#1
July 18, 2011 at 08:43:35
Try:

ipconfig /all | findstr 00-0E-7B-89-C4-E0 >nul
if %errorevel% neq 0 goto abort


Report •

#2
July 18, 2011 at 18:56:36
I get an error saying "0 was unexpected at this time.. appreciate your help so far.

Report •

#3
July 19, 2011 at 11:32:07
Can you share your full code and after which command you get the error?

EDIT: I see the same issue, one second


Report •

Related Solutions

#4
July 19, 2011 at 21:48:38
How did you go?

Report •

#5
August 10, 2011 at 18:54:13
I worked it out!

if %errorevel% neq 0 goto abort - should be - if %errorevel% equ 0 goto abort


Report •


Ask Question