-3

I have a batch file that register DNS and cleans browser cache and after that it opens a particular URL. Now my requirement is that i want that same batch file can also be used to determine the othr system ip and mac(i mean that file also reads and provide the mac and ip).

Please guide for the same in batch file...

  • which part of your code troubles you? – Stephan Apr 02 '16 at 07:40
  • This is bad, but `ipconfig` provides you with these things. However, you need to get it from there. As Skip R suggested, you can use `getmac /s hostname` but it may fail very quickly, use `getmac` instead and find it yourself. `tracert` is fine. – Peter Badida Apr 02 '16 at 08:37

1 Answers1

0
  1. win9x or higher: output of tracert hostname gets you ip number
  2. win7 or higher: output of getmac /s hostname gets you MAC address
Skip R
  • 383
  • 3
  • 14