A Scheduled Task to Distribute a Batch File Distribution Package Returns "Incorrect function"

Version 7

    Verified Product Versions

    Endpoint Manager 9.6Endpoint Manager 2016.xEndpoint Manager 2017.x



    The following errors occur when deploying a batch file distribution package:

    Incorrect function





    The incorrect function error is the Microsoft Windows string for error 1.  This is not an Ivanti EPM error.


    To see all Microsoft error codes, see this site:




    "Incorrect Function" indicates that LDMS is functioning properly, but there is a problem with the batch file.


    1. Find the last line run in the batch file.  This line is returning an error 1 which is being translated to "Incorrect function" error.

    2. Right-click on the error in the console and select "View log file," or open the sdclient_task##.log for the task on the client machine found in the ldclient\data directory. These logs will show where the batch file failed.

    3. Some common causes of this error message:

      1. The batch file is trying to access files on a network share but the Local System account on the managed device does not have the appropriate share and file permissions.

      2. The batch file points to a mapped drive that exists for logged on users but does not exist for Local System.

      3. The batch file contains the "EXIT" statement.

    4. Add any additional files that the batch file is trying to copy or install as additional files to the software package. This will cause them to be downloaded to the SDMCACHE folder on the client. An example of a batch file copy command is:

      copy /Y "file.exe" "C:\Program Files\file.exe"



    5. Modify the batch file appropriately and reset the package hash.