Client Management Suite

 View Only
  • 1.  SWD Return Codes

    Posted Jul 25, 2016 03:51 PM

    Hi All,

    When Altiris reports back on the Return Codes in SWD, is this return code from the actual application I am deploying?

    Exp.

    I have a SWD task that creates a shortcut in the All Users Start Menu folder to a website and after the task runs I get a hand full of computers that return with the following message:

    <nobr>Failure message: </nobr> Program has failed with return code = 0
    <nobr>Package download status: </nobr> Package downloaded successfully, but failed to launch the program successfully

    When I manually check to see if the shortcut was created I get mixed results back.  Some of the failure targets got the new shortcut and some did not.

    I'm guessing the the "return code=0" tells me that my script LAUNCHED and EXITED successfully?



  • 2.  RE: SWD Return Codes

    Posted Jul 25, 2016 11:59 PM

    Looks like you need to define your success codes in the pacakge. SWD will consider any exit code that is not listed in your success codes as failed.



  • 3.  RE: SWD Return Codes

    Posted Jul 26, 2016 06:13 AM
    Have you defined extra success codes in the Software Release or Task? If so you need to also add '0' to the list explicitly. The trouble with using scripts to do anything is that the Symantec Agent (SMA) will return the code from the script overall, the whole script can fail except for the last line writing a registry key and the SMA will still report '0' success. It's best practice to do this using a Software Release with a detection check and a Managed Software Delivery Policy.


  • 4.  RE: SWD Return Codes

    Posted Aug 08, 2016 01:08 PM

    Just to run a script to create a shortcut in a menu? Wow, that's a lot of work to run a script that is only a few lines to make a shortcut.
    Personally, I'd do error checking in the script, even write to a log file using the script. That way you can tell what it has done after each step and where it might be failing, independent of the Symantec agent reporting.

    So to create a basic shortcut, you'd create a software release, and then run it using a policy?

    I'd take a script similar to this snippet from a shortcut creating script I have and have it write to a log on the local PC after each step.
    For example, if the lnk file does not exist, write into the log file not found, will create it,
    Then have it do the create and check for an error or lack of error and log that. Then have it check again for the lnk file and say "no error, lnk file now exists" etc.

    I had a script create a link or shortcut in the SendTo menu so people could right click on a file and send it to a conversion folder to be converted FROM a PDF file to a Word document. It's part of our login script actually, but I'd simply create a job (or task or whatever it's called) and have the agent run it on a schedule if that was the preferred way.

        If objFSO.FileExists(strSendTo & "\Convert PDF.lnk")=0 Then

        '  Create WshShell.CreateShortcut object type and specifying the name of the link
        Set oShortcut = WshShell.CreateShortcut(strSendto & "\Convert PDF.lnk")

        '  Specify the target pointed to by the link
        oShortcut.TargetPath = InputDir

        '  Create the shorctut lnk by saving it
        oShortCut.Save

       End If



  • 5.  RE: SWD Return Codes

    Posted Aug 08, 2016 01:50 PM

    Well, you've written 10 lines of computer code to try and duplicate what the tool does for you.

    In addition the Symantec Management Agent tells the database that the Command Line has successfully run and, if it's a command line of type "Install", will add the GUID of the Software Release/Update/Service Pack to the installed software list in Inventory.

    You can also use the Software Execution Report to accurately monitor the success of your installs.

    Jobs and Tasks put more load on the infrastructure than Managed Software Delivery Polices.