[wpkg-users] Error when writing to event log

Rainer Meier r.meier at wpkg.org
Mon Aug 18 18:56:28 CEST 2008

Hi Joe,

Joe wrote:
> Right but I am concerned that an error dialog would pop up
> (I'm running wpkg as a scheduled task with a user called wpkg)
> and the actual user logged in (or maybe there is no user logged
> in) would never see this error.  Then wpkg is effectively frozen
> awaiting input.

There is no error dialog opened by WPKG. If the /quiet flag is used then 
it writes to the event log. This is the preferred way of logging WPKG 
actions as it integrates well into Windows management tools. In addition 
  newer WPKG versions can log to plain text files.

So if you do not set /quiet, then it will write to STDOUT (which is not 
displayed if WPKG runs as a service in the background). Therefore there 
will be no output. There is also no dialog box opened (unless you're 
wrongly executing wscript.exe instead of cscript.exe when running wpkg.js).

Unfortunately the Windows XP event log is quite small and so it might 
happen that it runs full. In such case WPKG detects write errors to the 
event log and falls back to STDOUT logging. Logging to the log-file is 
not affected by this - it will continue as usual.

Note that in any case (/quiet used or not) it is recommended to use 
/nonotify in order to prevent notifications sent to the user. These 
notifications would be sent using 'net send' command, so WPKG will not 
stop waiting for the user to confirm the dialog box in any case.

In your case please clean the event log of the affected computer. I 
suggest also to make sure /debug flag is NOT active. Please note that 
you can still get DEBUG level log-files by setting an appropriate log 
level. LegLevel does not affect verbosity of event log entries while 
/debug does. So I recomment not to use /debug since it can fill up 
Windows event logs within one or two runs.
I do NOT recomment removing the /quiet flag unless you are not 
interested in the event log entries at all. Usually if /debug is not 
enabled WPKG will just print something to event log in case of package 
changes (updates, new packages, delete packages, execute=always 
packages) which should be only a few (or none at all) entries per run. 
In worst case WPKG still completes correctly by just failing over to STDOUT.

Please also note that some other Windows tools/programs will have 
problems if event log is full. Some programs simply start to behave 
oddly. It looks that most programmers do not expect getting an exception 
when writing a simple log entry (also WPKG did not unless we analyzed 
the problem which was actually hard to discover and reproduce).

Again, what you should do:
- Clean event log on affected machine
- Make sure to use /quiet flag
- Make sure to use /nonotify flag
- Make sure NOT to use /debug flag


More information about the wpkg-users mailing list