Command Task Alert Detail - Error 3010



The information in this article applies to:

  • Prism Deploy


SUMMARY

When a command within a Command Tasks reports an error code, this is captured in the Deployment Reports.  The Task will report Error 5200 - Command Execution Failed for any error during execution of the command.  The actual error code retuned by the command can be seen by expanding the Alert.
 

METHOD

In this case, the command is returning 3010.  This is a standard Windows Installer error code "ERROR_SUCCESS_REBOOT_REQUIRED".  It means that the command executed successfully, but the installation will not be completed until the next reboot.  Other error codes returned by Windows Installer can be found here:

http://support.microsoft.com/default.aspx?scid=kb;en-us;229683

To avoid this error, your Command Task can be edited so that it includes the reboot on the command line.  Options such as "/r:i" will prompt the user to reboot if one is necessary.  Other options for command line switches can be found here:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q197147

If you are using Prism Deploy 6.0.2 or later, your other option would be wrap a Prism Script around this command and actually return a 0 (success) if 3010 is detected.  To create this script, rename a simple text file with a .pts extension.  Then edit the file so it looks similar to this:

/run /wait XPSP2 /q
if %lasterror% == "0"
  /ExitScript 0
elseif %lasterror% = "3010"
  /ExitScript 0
else
  /ExitScript %lasterror%
endif

The %lasterror% variable stores the result of the command.  In this case, if the command was a success, then success is returned for the Script Task.  If the result was "ERROR_SUCCESS_REBOOT_REQUIRED", then success is returned for the Script Task.  If there is any other result, then the error code itself is returned for the Script Task.