cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
582
Views
0
Helpful
2
Replies

LMS 2.6 for windows - how to pass params to Syslog automated action program

kenfu3345
Level 1
Level 1

I wrote a program in and there are 2 dynamic variables need to be pass to the program where syslog generate

$D - device name and

$M - syslog message

Why the following does not work ? which sytax I should use ?

d:/PROGRA~1/CSCOpx/files/scripts/syslog/kentrap.bat $D $M

2 Replies 2

frankzehrer
Level 4
Level 4

Hi friend,

i guess the spaces between the batch and the variables are the problem.

Try to set the whole string into quotas.

e.g. "d:/PROGRA~1/.... $D $M"

Or create another batchfile from where you execute the mentioned command and parameters.

Hope that helps a bit.

Best regards,

Frank

Joe Clarke
Cisco Employee
Cisco Employee

This won't work. $D and $M are obsolete. You should just enter your script name in the dialog. Within the script, you can get the hostname by dereferencing %~1 and the syslog message by dereferencing %~2.