Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for login_log_ip_mac_simple.bat

(view source code of login_log_ip_mac_simple.bat as plain text)

  1. FOR /F "tokens=1,2 delims=:" %%A IN ('IPCONFIG /ALL ^| FIND "Address"') DO (
  2. 	FOR /F "tokens=1,2" %%C IN ("%%~A") DO (
  3. 		FOR %%E IN (%%~B) DO SET %%C%%D=%%E
  4. 	)
  5. )
  6. >> \\Server\Logs\%Today%\%UserName%.log ECHO.%IPAddress%,%PhysicalAddress:-=%

page last modified: 2022-10-20