G
Gordon
I'm working on a CMD/VBS script package to do some automated cleanup
processes.
The VBS portion of the package that performs the bulk of the process,
also creates a
system environment variable that contains a string value that I want
to use as an argument
for the eventcreate command in my CMD file.
Try as I have, I just cannot figure out the syntax to get the
environment variable string
into the eventcreate line so that it executes properly and writes a
correctly formatted
event to the event log.
The environment variable name is JPEG_COUNT and I've verified in
testing that it is
properly created in my VBS script and is properly named and valued in
the registry.
Would someone please offer some suggestions on how to get this CMD
statement
to work by explaining how to get the /D argument right using the
environment variable?
eventcreate /T INFORMATION /ID 500 /L APPLICATION /SO Scripting /D %
%JPEG_COUNT%%
The preceding line results in the description field for the generated
event reading like this:
%JPEG_COUNT%
BTW The reason I'm not using the LogEvent method in my VBS script is
because I have no
control over the source and ID portions of the generated event log
entry and a different event
log filtering script relies on being able to filter /ID 500 /SO
Scripting events.
TIA
Gordon
processes.
The VBS portion of the package that performs the bulk of the process,
also creates a
system environment variable that contains a string value that I want
to use as an argument
for the eventcreate command in my CMD file.
Try as I have, I just cannot figure out the syntax to get the
environment variable string
into the eventcreate line so that it executes properly and writes a
correctly formatted
event to the event log.
The environment variable name is JPEG_COUNT and I've verified in
testing that it is
properly created in my VBS script and is properly named and valued in
the registry.
Would someone please offer some suggestions on how to get this CMD
statement
to work by explaining how to get the /D argument right using the
environment variable?
eventcreate /T INFORMATION /ID 500 /L APPLICATION /SO Scripting /D %
%JPEG_COUNT%%
The preceding line results in the description field for the generated
event reading like this:
%JPEG_COUNT%
BTW The reason I'm not using the LogEvent method in my VBS script is
because I have no
control over the source and ID portions of the generated event log
entry and a different event
log filtering script relies on being able to filter /ID 500 /SO
Scripting events.
TIA
Gordon