Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending a msg to NT Administrators
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00314911
Message ID:
00369224
Views:
22
Isn't the drawback to using WSH the fact that the source is "WSH" and not the name of your app? And how do you write events to the Event Log?




>If you're running on an NT system, you could log errors to the NT Event log using the WSH 2.0 Wscript.Shell automation object fairly easily, there's a LogEvent method available:
>
>oShell = CREATEOBJ('Wscript.Shell')
>oShell.LogEvent(nIntType,cLogMessage,cTargetMachine)
>
>nIntType may be one of:
>
>
Number  Event Type
>     0     Success
>     1     Error
>     2     Warning
>     4     Information
>     8     Audit_Success
>    16     Audit_Failure
>
>cLogMessage can be a string of up to 255 bytes
>
>You can specify a different machine's NetBIOS name as the third parameter. If omitted under NT, the current system's Event Log is used. Win9x writes to a local log in the System directory called WSH.LOG, and will ignore the third parameter in all cases.
Previous
Reply
Map
View

Click here to load this message in the networking platform