Write to Windows event log: Difference between revisions
m
→{{header|Batch File}}: Changed to the proper way to hide output (>NUL 2>&1)
Simple9371 (talk | contribs) m (→{{header|Batch File}}: Changed to the proper way to hide output (>NUL 2>&1)) |
|||
Line 238:
If you do not want the command to display its result or errors...
<lang dos>@echo off
EventCreate /t ERROR /id 123 /l SYSTEM /so "A Batch File" /d "This is found in system log."
EventCreate /t WARNING /id 456 /l APPLICATION /so BlaBla /d "This is found in apps log"
::That "
'''NOTE:''' This will (...or might) not work if you do not have administrator privileges.
|