I'm currently writing a automated log by batch scripting and supposed to insert into a custom event using eventcreate.
log.txt ( inside contain information on the incidents )
eventcreate /id 101 /l application /t warning /so Something bad happened /d "%log%"
in this case, how am I able to create the event with the content in the log.txt ?
thanks..
If log.txt has a single line for each error you could try something like this in your bat file:
Otherwise if log.txt might contain multiple lines but you need to create only one event: