Re: Assistance required writing to event viewer/log

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"meridean" <chris.john.flynn@xxxxxxxxx> wrote in message
news:1186383775.642540.104410@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 2, 2:34 pm, "J.Williams" <johnZZwilliams.ZZesqu...@xxxxxxxxxxx>
wrote:
"meridean" <chris.john.fl...@xxxxxxxxx> wrote in message

news:1186043229.708016.97900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The reason it would not have written to the eventvwr is because the
WSH part of the script is not supported in an HTA script. I am looking
for alternative code to replace this.

Not sure what you're saying there because this test.hta script works fine
using WSH to write to the event log:

<html>
<head>
<title>Event Log Test</title>
<HTA:APPLICATION>
</head>
<SCRIPT Language="VBScript">
sub logEvent
set WshShell = CreateObject("WScript.Shell")
WshShell.LogEvent 0, "Test event " & Now
End sub
</SCRIPT>
<body>
<input type="button" Value="Click to write to Event Log"
onclick="logEvent"></P>
</body>
</html>




.


Quantcast