I need to tweak an eventcreate statement in an existing, but antique, batch file, to include a variable in the event log.
I've tried multiple ways but can't get it to work.
The statement currently looks something like this:
eventcreate /SO "batch file name" /Id 999 /D "specific event" /T INFORMATION /L Application
I need to include the value of a variable in the description like this:
eventcreate /SO "batch file name" /Id 999 /D "variable value is %%test%%" /T INFORMATION /L Application
I tried placing that variable outside the quotes, but the event log entry shows the variable name, but does not replace it with the actual value of the variable.
Anyone know if this can be done?