[wpkg-users] Forgot command, exit status 0?

Rainer Meier r.meier at wpkg.org
Wed Mar 11 17:44:36 CET 2009


> I would agree to you that exec() should not return with 0 return value
> if the command is not found. As written I will verify if it is a bug of
> wpkg.js or the just "by design".

I just verified relevant parts of the code. Install commands are
processed by WPKG-internal exec() functionality. It uses
WScript.Shell.exec() function which clearly throws an error if a binary
is invoked which is not a valid Win32 application.

The exception is catched by WPKG exec() method and depending on the
settings it quits immediately or logs the corresponding error to log
file and/or system event log. You should see a message like

"Command '.....' was not successful.
The system cannot find the file specified."

Then WPKG exec() either exits or returns with status -1.


Probably you have seen this error within your logs.
As a result to exit status -1 WPKG will throw an error and stop to
continue package installation if -1 is not defined to be a successful
exit code of the command.


Did you specify any checks within the package?
If yes, then WPKG can regard the package to be successfully installed
even if some commands failed on previous execution.


br,
Rainer



More information about the wpkg-users mailing list