Registry object example: If a command is issued to delete a registry key or value that does exist, a return code of 0 would be expected upon the completion of the command which means that the key or value did exist and therefore the command to delete it was completed successfully. However, if the key or value does not exist and a command was issued to delete it, a return code 2 would be expected meaning that the key or value could not be found and therefore the command to delete it was not carried out because it did not exist. If a command was issued to delete a key or value that did not exist, one would want to know by the return code whether it was found and deleted successfully (return code 0), or whether it was not found and therefore not deleted (return code 2).
Printer object example: If return code 2 is received when attempting to add a printer then this message indicates that the printer name and the share name do not match exactly. In order for the script to set the printer as default, the printer name and the share name must match exactly (case sensitive).
Note: If you received this return code on an object other than those listed above, please Contact Technical Support.