WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

wntEventLog Problem


Question:

It seems there is a problem with the win32 network extender and windows xp. Eventlogs are written but are incorrect.

The description for Event ID ( 1 ) in Source ( WBMSG ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Started.

Demo:

AddExtender("WWWNT34i.DLL")
wntEventLog("", "Started")
Using:
Winbatch 2004c all extenders updated with vcheck

Checked the register path to the dll is ok.

Answer:

The function wntEventLog() will unconditionally attempt to create the registry entry and point it at the copy of WWWNT34I.DLL that is being used to execute that extender function. No error checking is done and if the attempt to modify the registry fails nothing is reported back in the way of an error.

I don't think that changing the behavior of wntEventLog() is going to help at this point, though. It is possible to add, perhaps, a flag variable to pass in that allows you to enable some error reporting as to whether or not it created the registry values successfully or not. However, you can put code in your script to test those registry entries; they are documented in the help topic for wntEventLog() and the Reg*() functions in WinBatch can be used to manipulate registry entries. Additionally, you can use a remote registry handle to make these registry changes on remote computers as well, although you're going to need to access to a share [e.g. "ADMIN$"] on the remote system in order to copy the DLL file over there.

This isn't some arbitrary requirement imposed by WinBatch. The requirement for the registry entries and the DLL to be present are imposed by the Win32 Event Log Service. Extension of the event service is permitted provided that custom sources of event log messages provide their own event message DLL files that *must* be properly registered on the system. The fact that it must be registered on multiple systems if they can all log the custom events is just a part of how the event log service is designed and of how it functions.


Article ID:   W16528
File Created: 2005:02:18:12:21:16
Last Updated: 2005:02:18:12:21:16