masonje Posted October 12, 2006 Share Posted October 12, 2006 I have a small grp of users who are getting script errors with one of my install scripts that writes to the event log. So just to test on one of the issue PCs, I slapped down a quick "hello world" to see what would happen and I got the same error in the same place. Attached is the error screenshot from the original installer and below is my sample code. $WshShell = ObjCreate("WScript.Shell") if @error or $WshShell = 0 Then MsgBox(266288,"WshShell","Could not create object.") Exit EndIf $WshShell.LogEvent(4, "Hello World") Thoughts on why that user's PC is erroring out and most every one else is fine. Looks like something is wrong with there event logging itself. Link to comment Share on other sites More sharing options...
this-is-me Posted October 12, 2006 Share Posted October 12, 2006 Do you have a com error handler in your script? Example: $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Install a custom error handler ; Performing a deliberate failure here (object does not exist) $oIE = ObjCreate("InternetExplorer.Application") $oIE.visible = 1 $oIE.bogus if @error then Msgbox(0,"","the previous line got an error.") Exit ; This is my custom error handler Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "Windescription is: " & $oMyError.windescription ) SetError(1) ; something to check for when this function returns Endfunc Who else would I be? Link to comment Share on other sites More sharing options...
masonje Posted October 12, 2006 Author Share Posted October 12, 2006 No Com error handler. How would I implement that? An adlib? Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 12, 2006 Share Posted October 12, 2006 An example was provided. Do they have a verson of Windows that doesn't support the Event logs? Are they running Internet Explorer 6 with service packs? I found something very strange about Microsoft in that some Windows upgrades require installing a version of Internet Explorer because of the dll modifications it includes. Link to comment Share on other sites More sharing options...
masonje Posted October 12, 2006 Author Share Posted October 12, 2006 Sorry, I see that now. Sometimes my scripting can be some what linear in thought. I see how it works now. This installer is actually for XP SP2. Everyone should be up to date with patches and IE6. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now