Writes a "WBMSG" entry to the NT application event log.
wntEventLog( server-name, text)
(s) server-name: the UNC name of the server on which the function will execute (eg, "\\MYSERVER"), or a blank string ("") to indicate the current machine.
(s) text: a string that will be stored with the event, or "" for none.
(i) always 1.
This function will write an event with the message "WBMSG: xxx" to the NT application event log on the specified server, with "xxx" being replaced by the specified "text" string, and with an EventID of 1.
This function will attempt to set the following values in the registry on the local machine, to specify the location of the message file:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\WBMSG]
"EventMessageFile"="c:\\program files\\winbatch\\system\\wwwnt34i.dll"
"TypesSupported"=dword:00000004
If that key is not writable, or needs to be set on a remote machine, you will need to set those values manually before using this function.
Note: that the value "EventMessageFile" must be set to the full path of the Windows NT extender DLL.
The message file is part of the extender DLL itself. Since the Event Viewer locks and caches message files being used, you may need to close the Event Viewer before replacing or moving the extender DLL.
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
;write to the application event log wntEventLog("","Successful Exit") Exit