1 of 1 people found this helpful
You should read the guide at
The first thing I see is you are using @ECHO OFF
In order for LANDesk to "read" the batch file better, use @ECHO ON
LANDesk will supress it from the user, it will then be able to collect the data / output better.
That might do it, but you might have to put in some exit code info as shown in the guide
Sorry, I'm not really understand, am I change the script as below:
Echo Set Default Printer To Pantry Printer
rundll32 printui.dll,PrintUIEntry /y /q /n "FX ApeosPort-III C5500 PCL 6_Pentry"
Pls advise, thanks!
you need a true exit code to get a successful...
At first you have to check, if the line send a return code and which codes...
rundll32 printui.dll,PrintUIEntry /y /q /n "FX ApeosPort-III C5500 PCL 6"
In dependency of the return code you can change the exit codes, you can send to LANDesk, for example something like this:
IF “%ERRORLEVEL%”==”1001” EXIT /B 0
Take a look in the doc James' posted at page 20ff...
So you have hit the 16386 error with batch deployments you too.
I see that it is suggested that you do a "real exit 0" by mapping %errorlevel% to Exit /B 0
My experience with this errorcode is that it does not help.
Check your client log files, look for sdistbat.log in LDCLIENT folder
When I get the 16386 code, my log file looks like this:
--- start --Tue, 06 Mar 2012 14:38:47 Started command prompt for processing batch file (process id 3784)
Tue, 06 Mar 2012 14:38:47 Batch file process has exited.
Tue, 06 Mar 2012 14:40:47 Waiting for the batch file event returned 258Tue, 06 Mar 2012 14:40:47 Batch file status of -1918091262 obtained from shared memory--- end ---When I successfully deploys a bath file it looks like this:
--- start ---
Tue, 06 Mar 2012 14:32:37 3932 980 Started command prompt for processing batchfile (process id 3868)Tue, 06 Mar 2012 14:32:52 2916 2900 Setting status for batch file to 0 using event SetBatchFileStatusEvent
Tue, 06 Mar 2012 14:32:52 3932 980 Batch file process has exited.
Tue, 06 Mar 2012 14:32:52 3932 980 Waiting for the batch file event returned 0Tue, 06 Mar 2012 14:32:52 3932 980 Batch file status of 0 obtained from sharedmemoryTue, 06 Mar 2012 14:32:52 3932 980 treating status as win32 HRESULT, updated value 0x00000000--- end ---
Look at the bold lines, see how they differ. What the "batch file event returned 258" means? I dont know. Maybe LANDesk knows?
This I have seen on a lot of clients with LD90 SP2 with the latest MCPs.
My solution, upgrade the agent to LD90 SP3 => no more problems with batch deployments and the 16386 code.
Obviously, I need to upgrade to SP3 so that the problem can be solved.