I am trying to write a command-line script that will be triggered each time an event log in a specific Windows Event Log is logged. Here's what I have so far:
wevtutil qe WebsitePanel "/q:*" /f:text /rd:true /c:1 > %tmp%\WebsitePanelErrorLog.log
set var1 = < %tmp%\ErrorLog.log
C:\bmail.exe -s aspmx.l.google.com -t [email protected] -f [email protected] -a "wh00: WebsitePanel Event Logged" -b %var1%
del %tmp%\WebsitePanelErrorLog.log
The problem is var1 is not being set for some reason. If I do this, it just returns empty:
echo %var1%
Any ideas?