Skip navigation
1237 Views 5 Replies Latest reply: Apr 12, 2012 7:38 AM by rayjen0919 RSS
rayjen0919 Apprentice 137 posts since
Sep 30, 2009

Has received 1 of 9 achievements.
Currently Being Moderated

Apr 10, 2012 4:02 AM

SD - Batch Cmd Succeed deployed but result show failed (Code:16386)

Dear All,

 

Since I've created a batch file with below command:

 

@echo off
cls
echo Set Default Printer

pushd %~dp0
rundll32 printui.dll,PrintUIEntry /y /q /n "FX ApeosPort-III C5500 PCL 6"

 

The process result with error code 16386 but the specific printer is set to default successfully!

How to make it be "Succeed" Result???

 

sd_result.jpg

 

Please adivse, thanks!

RAY CHAN

 

Core: LDMS9.0 SP2 SD MSD PATCH 2011-0428 in Windows Server 2003 R2

  • mrspike SSMMVPGroup 1,313 posts since
    Dec 19, 2007

    Has received 9 of 9 achievements.

    You should read the guide at

     

    http://community.landesk.com/support/docs/DOC-2320

     

     

    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

  • ahe Expert 862 posts since
    Dec 21, 2007

    Has received 4 of 9 achievements.

    Hello,

     

    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...

     

     

     

    Regards

    Axel

  • btorstei Apprentice 45 posts since
    Dec 17, 2007

    Has received 2 of 9 achievements.

    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 258

    Tue, 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 0

    Tue, 06 Mar 2012 14:32:52 3932  980 Batch file status of 0 obtained from sharedmemory
    Tue, 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.


More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS® 4.5.7.1  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software