The following errors occur when deploying a batch file distribution package:
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.
Find the last line run in the batch file. This line is returning an error 1 which is being translated to "Incorrect function" error.
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.
Some common causes of this error message:
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.
The batch file points to a mapped drive that exists for logged on users but does not exist for Local System.
The batch file contains the "EXIT" statement.
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"
Modify the batch file appropriately and reset the package hash.