Pass error to Run System Command
I want a notification profile that pass event messages to a batch script. I have tried both the Err Append and Append options, but my scripts is not seeing any arguments. I might be getting this all wrong, but this is a test script that fails:
Example script
C:\scripts\myscript.bat
---
@ECHO OFF
rem This var contains all arguments passed to script
set msg=%*
rem unique tempfile
SET tempfile="C:\smsscripts\sms-%random:~-4%.tmp"
ECHO %CMDCMDLINE% >> %logfile%
echo "%msg%" >> "%logfile%"
---
Logfile:
---
cmd /c C:\scripts\myscript.bat
""
---
Tempfile:
---
ECHO is off.
---
This shows that %msg% is empty.
New to ADSelfService Plus?