Discussion Locked

Writing to the Event Log

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know of a command line utility that will allow a batch file or similar to write an entry to the event log?

I'm looking to automate some daily tasks on a couple of NT servers and it would be a very big bonus to be able to write information into the event log which can be viewed the same as other entries.

Thanks,

--
Gary Williams

3 replies

by dao251

Gary,

I would recommend you downloading Windows Script Host (WSH) and using JScript/VBScript programs instead of batch files.

WSH provides WshShell object having LogEvent method, which does exactly what you want.

You can download that fromMS website:
http://msdn.microsoft.com/scripting

HTH,

Dima Oussevitch
Brainbench MVP for WinNT Admin
http://www.brainbench.com

by garydw

Thanks,

I suspected that scripting may be the better option but I've not used it before - Good time to learn I guess!!!

This discussion is closed to new replies.