Skip to main content

Print Wizard Error Codes

Introduction

The Print Wizard engine is designed to be ran from a script or another application without any user interaction if necessary. When the Print Wizard engine is ran in "quiet" mode (with a command line switch of "/q"), Print Wizard returns an error code to the script or application upon completion.

Return Codes

Below is a list of error codes returned by the Print Wizard engine and its subsidiary programs.

0   Successful                    16    Function (service) exceeds license
 1   No files or bad filename      17    Socket hand-over failed for source
 2   Problem with profile          18    Service ini file missing
 3   Bad printer name              19    Service name invalid
 4   Print failed                  20    No service name found
 5   Email failed                  21    Email cancelled by user
 6   Fax failed                    22    Fax cancelled by user
 7   PDF generate failed           23    Preview or printer select cancelled
 8   By-File-Type failed           24    JPEG failure
 9   By-Custom failed              25    JPEG warning
 10  Reg extension failed          26    One or more subjobs failed
 11  License expired               27    Delete of file failed
 12  Bad command-line parameter    28
 13  Listen failed                 29
 14  Despool failed                30    Abort exception raised
 15  Lpd failed                    99    Unknown exception raised
MapiSend return codes
 0      OK                         66   No messages  -1     Mapi DLL failure           67   Invalid message  51     Mapi error - User abort    68   Text too large  52     Mapi error - Failure       69   Invalid session  53     Mapi error - Login failure 70   Type not supported  54     Mapi error - Disk full     71   Ambiguous recipient  55     Mapi error - Memory        72   Message in use  56     Mapi error - Access denied 73   Network failure  58     Too many sessions          74   Invalid edit fields  59     Too many files             75   Invalid recipient  60     Too many recipients        76   Not supported  61     Attachment not found       ----  62     Attachment open failure    80   Bad parameters  63     Write failure              81   Bad or missing file  64     Unknown recipient          82   Missing a phone or fax  65     Bad recipient type         83   Bad or missing profile

Example

A very simple example of running the Print Wizard engine from a Windows script is shown below:

‘ Run this from Cmd as    wscript xxxxxx.vbs   for dialog messages
‘ or                      cscript xxxx.vbs     for console messages

set shell = CreateObject("WScript.Shell")

for each filename in WScript.arguments
  ‘Process each command-line filename

  set pw = shell.Exec("c:\printwiz30\printwiz.exe /q " + filename)

  do while pw.status = 0
    WScript.echo "Print Wizard processing, processid is ", pw.processid                    
                                      ‘ current process id
    WScript.sleep 100
 
  Loop

  WScript.echo "Print Wizard complete for file " + filename
  WScript.echo "  return code", pw.exitcode           ‘ PW Halt Code
  WScript.echo "  program status code ", pw.status   
                                      ‘ PW status (0 running, 1-terminated)

next

Windows Services

If a Print Wizard Windows Service should encounter an error, we report that error either in the Print Wizard log file, if logging is turned on, or in the Windows System Logs.

You can check the Windows system logs via the Control Panel in Windows XP by going to the Control Panel : Administrative Tools : Event Viewer and look for PWServices, or the service name having the problem. The error codes reported above should be reported depending on the problem, within that log event.

Copyright © 2024 Rasmussen Software, Inc. Legal Information & Privacy Policy
Send comments and suggestions to rsi@anzio.com