REM Login Script: for /f "Tokens=2 Delims=[]" %%i in ('ping -n 1 "%computername%"') do set IP=%%i echo %username% logged ON %computername%, IP=%IP% @ %time% %date% >> F:\$\%username%.txt REM Logoff Script: echo %username% logged OFF %computername% @ %time% %date% >> F:\$\%username%.txt REM Startup Script: for /f "Tokens=2 Delims=[]" %%i in ('ping -n 1 "%computername%"') do set IP=%%i echo Started up, IP=%IP% @ %time% %date% >> F:\$\%computername%.txt REM Shutdown Script: echo Shutdown @ %time% %date% >> F:\$\%computername%.txt
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)