object.LogEvent(intType, strMessage [,strTarget])

Using VBScript...

Is there a limit to the length of "strMessage"?

Is it possible to put a hyperlink in "strMessage" (aside from the one
Windows adds) so the user could click to get more info?

Is "intType" restricted to the 6 values listed in the WSH documentation? If
not, how can I put my own values in?

Is it possible to change event source from WSH to, say, the name of the
script?

Thanks,

Tom

Re: LogEvent questions by J

J
Fri Jan 28 15:23:12 CST 2005


"Tom Ker" <thomasDOTkerA@ThighmarkDOTcom> wrote in message
news:uzN90$VBFHA.2112@TK2MSFTNGP14.phx.gbl...
> object.LogEvent(intType, strMessage [,strTarget])
>
> Using VBScript...
>
> Is there a limit to the length of "strMessage"?
>
> Is it possible to put a hyperlink in "strMessage" (aside from the one
> Windows adds) so the user could click to get more info?

No, according to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/logging_guidelines.asp.

> Is "intType" restricted to the 6 values listed in the WSH documentation?
> If not, how can I put my own values in?
>
> Is it possible to change event source from WSH to, say, the name of the
> script?

You can change the source name using STMAdmin.DLL, available from
http://cwashington.netreach.net/main/tools/default.asp?topic=n-z. Doco at
http://cwashington.netreach.net/main/library/stmadmin.html

Note it says that WMI/WBEM obsoletes this control, so you might want to
investigate that method of writing to the event log.



Re: LogEvent questions by Torgeir

Torgeir
Fri Jan 28 16:00:44 CST 2005

J Williams wrote:

> "Tom Ker" <thomasDOTkerA@ThighmarkDOTcom> wrote:
>
>>Is it possible to change event source from WSH to, say, the
>>name of the script?
>
>
> You can change the source name using STMAdmin.DLL, available from
> http://cwashington.netreach.net/main/tools/default.asp?topic=n-z. Doco at
> http://cwashington.netreach.net/main/library/stmadmin.html
>
> Note it says that WMI/WBEM obsoletes this control, so you might want to
> investigate that method of writing to the event log.
Hi,

That note is in error, WMI have no support for writing to event logs...


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx