G
G
ggruno2020-10-06 18:50:51
cmd/bat
ggruno, 2020-10-06 18:50:51

How to get the mac address in a variable?

I need to run a browser from the batch file on 7, where the link at the end contains the poppy of the machine.
I'm not strong in scripts on Windows.
Can anyone tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2020-10-06
@res2001

Something like this: run - ipconfig displays a footprint of data on network connections, using the condition in findstr filter the ipconfig output so that there is one line with the desired MAC. You drive the whole structure into for / f:ipconfig /all | findstr ...

for /f "tokens=... delims=..." %%a in ('ipconfig /all ^| findstr ...') do (
  start browser %%a
)

Now there is no Windows at hand, so they will not write in more detail.
For reference:
ipconfig /?
findstr /?
for /?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question