You are not logged in.
Pages: 1
We frequently clone the computers at work so i need a way to retrieve the mac address on the startup script and set it as a variable so i can then compare it with a database and asign it the correct ip and pc name.
If anyone already has an easier way of retrieving the mac address I will be happy to know your method but this is my attempt so far.
FOR /F "skip=13" %%G IN ('ipconfig /all') DO SET macaddress=%%G
echo %macaddress%
pause
I have used skip=13 because that line is where physical adress is on, but i want it to just retrieve the mac address on line 13 and set it as %macaddress%
Last edited by NDog (30 Mar 2007 08:28)
cmd, vbs, ps, bash
autoit, python, swift
Offline
you could use getmac
Offline
Pages: 1