Stap 1: Maak de Code
Het creƫren van de code.
off if not exist "%USERPROFILE%\Logs" mkdir "%USERPROFILE%\Logs" echo %USERPROFILE%\Logs\batchlog.txt echo "Logged at %time%, %date%, by %USERNAME%" >> %USERPROFILE%\Logs\batchlog > usermessage.vbs ECHO WScript.Echo( "Logged succesfully by %UserName%" ) WSCRIPT.EXE usermessage.vbs DEL usermessage.vbs Als dat niet het bestaan van "% USERPROFILE%\Logs" mkdir "% USERPROFILE%\Logs" echo %USERPROFILE%\Logs\batchlog.txt echo "Aangemeld om % time %, % date %, door % USERNAME %" >> %USERPROFILE%\Logs\batchlog > usermessage.vbs ECHO WScript.Echo ("aanmelding succesvol door % UserName %") WSCRIPT. EXE usermessage.vbs off if not exist "%USERPROFILE%\Logs" mkdir "%USERPROFILE%\Logs" echo %USERPROFILE%\Logs\batchlog.txt echo "Logged at %time%, %date%, by %USERNAME%" >> %USERPROFILE%\Logs\batchlog > usermessage.vbs ECHO WScript.Echo( "Logged succesfully by %UserName%" ) WSCRIPT.EXE usermessage.vbs DEL usermessage.vbs
Dat is de standaardcode. Die in Kladblok plakken en op naar: