Operation Failed

There are several reasons why an Operation may fail to run. Please check the following items:

Check the error code to determine the reason for the failure. Click on error codes to review common error values and a brief description.

If you are trying to access network drives and SmartBatch is configured to run as a Service (this is typical for most NT installations), make sure the network drives you are trying to access are mapped as explained in Network Drive Mappings and NET USE.

Error 2 and Error 5 problems:

Make sure the path to the executable, .bat or other script file is correct and there are no typos. If there are spaces included in the path or filename it is necessary to enclose the path\program.exe in quotes. For example, Operation:

c:\program files\SmartBatch\smartreplace\smartreplace.exe

should be:

"c:\program files\SmartBatch\smartreplace\smartreplace.exe"  

Where the quotes are actually entered into the Operation.

If the quotes are not specified, an error 5 is returned. Error 5 is the error the Windows Operating System returns. This indicates access denied which is not the error you would expect.

Make sure the SmartBatch Service (Control Panel, Services) has the correct authorization to access the resources required by the Operation.  By default SmartBatch installs the Service under System Account. System Account does not have access to network resources such as files, printers, UNC names, etc.  See Service Environment and Security for more information.  You may need to reconfigure the SmartBatch Service to run under a specific id. To do this go to Control Panel, Services, double-click on the SmartBatch Service, select the This Account option, enter a specific id, Password and Confirm Password, click OK, Stop and then Start the SmartBatch Service for the changes to take effect.

Make sure the syntax of the Operation is correct.  This varies greatly since SmartBatch can run any program and programs differ in the way they are run.  If you are trying to run a .bat file it can be entered as:

cmd.exe /c mybatfile.bat

or just

mybatfile.bat

Make sure the path to the program or script you are trying to run is correct. If you are not using the full path, try using the complete path name to the file.

Make sure the Working Directory is correct. Some programs expect to be started in a specific directory so that they can find certain files. If this is the case, make sure the Working Directory field on the Operation Update window has been entered and is correct.

If you are using UNC naming, try the Operation using drive letter naming instead (e.g., d:\mybats\myscript.bat).

Note:  UNC names are resolved at the domain. If you do not have access to the domain or the  SmartBatch service does not have access to the domain, the Operation will fail.

There are several debugging methods you can use to determine why the Operation failed. Such as:

Check to see if the Operation will run through the Preview Operation capability. Operation Preview allows you to run the Operation from the SmartBatch Administrator. You access Operation Preview from the Operation Udpate window.

Check to see if the Operation will run from the Windows Start menu run capability. If it runs from the Start menu, it should run from the Operation Preview also. If it does not, contact OnLine ToolWorks Corporation for assistance.

If it runs from the Operation Preview but does not run when scheduled, refer to Frequently Asked Questions for more information.