+ Post New Thread
Results 1 to 10 of 10
Enterprise Software Thread, Using Robocopy as an SCCM 2012 package Reporting back as failed when it hasn't in Technical; Hi, I wish to create an SCCM package that will copy down some .jpg files to the machine. I have ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,957
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448

    Using Robocopy as an SCCM 2012 package Reporting back as failed when it hasn't

    Hi,

    I wish to create an SCCM package that will copy down some .jpg files to the machine. I have created the package, it works just fine and copies the files down no problem, but SCCM tells me it has failed.

    I have put this into the program command - robocopy "source" "C:\destination" /mir

    Does anyone know how to prevent it reporting back as failed please?

    Thanks

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,009
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108
    Robocopy probably isn't giving a correct exit code. You may have to use some kind of script wrapper to pass the desirable code.

  3. #3

    Theblacksheep's Avatar
    Join Date
    Feb 2008
    Location
    In a house.
    Posts
    1,934
    Thank Post
    138
    Thanked 290 Times in 210 Posts
    Rep Power
    193
    add the reported correct safe error codes to the sccm package.

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,957
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448
    Hi @ChrisH & @Theblacksheep please can you expand a little please? Do you know how i can do these steps please?

    Thanks

  5. #5

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,696
    Thank Post
    335
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    If you can use multiple lines you should be able to do:

    Robo.....
    Exit /B 0

    Just makes it force return 0 (which is normally successful exit) might want to check that for sccm though!

    But that will always return success, but due to robo's stupid exit code system not much choice without using lots of if statements

    Steve

  6. Thanks to Steve21 from:

    FN-GM (1st August 2012)

  7. #6

    Theblacksheep's Avatar
    Join Date
    Feb 2008
    Location
    In a house.
    Posts
    1,934
    Thank Post
    138
    Thanked 290 Times in 210 Posts
    Rep Power
    193
    Quote Originally Posted by FN-GM View Post
    Hi @ChrisH & @Theblacksheep please can you expand a little please? Do you know how i can do these steps please?

    Thanks
    Make sure your command is correct and the results (besides the exit code) is correct. Dunno much about robo exit codes personally, check what you are getting is OK.

    SCCM defaults for exit codes for success (0), reboot (1604,1641,3010,3011), retry (loads). If it looks OK, you can add other exit codes to report as correct. Have a play, take a look at the options on the command line for whatever package you are using. it'll list success error codes (like 0) add your custom exit code number here and it'll report as success.

  8. Thanks to Theblacksheep from:

    FN-GM (1st August 2012)

  9. #7
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,009
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108
    Robocopy exit codes Robocopy Exit Codes

    Look in the properties of the package for exit codes as suggested or use Script to test the exit code by an application - Adnan Ezzi parts of this code to write a script to get the code then return the desired code back to sccm.

  10. Thanks to ChrisH from:

    FN-GM (1st August 2012)

  11. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,957
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448
    Thanks Guys.

    I might find the exit code and tell SCCM to go off that. I have had a quick look to see if i can change it in a package and cant see it. It must be to late, will look in the morning.

    Thanks

  12. #9

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,957
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448
    @ChrisH i cant find this in SCCM 2012 but where can i change the default exit codes on a package please?

    Thanks

  13. #10
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,009
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108
    @FN-GM I don't think there is an option to change the codes if it is a package, you will need to script it. You can set it as an application though if you do a custom app and not auto detect. Once it is set up you go to properties > Deployment Types > Edit > Return Codes. I haven't had to use this method with a script before though so I don't know how well it will work.

SHARE:
+ Post New Thread

Similar Threads

  1. Sooo... who's using SCCM 2012
    By gshaw in forum Enterprise Software
    Replies: 14
    Last Post: 18th January 2012, 04:13 PM
  2. Anyone got an idea of the release date for SCCM 2012?
    By pete in forum Enterprise Software
    Replies: 1
    Last Post: 7th June 2011, 01:17 PM
  3. Using an LCD TV as an electronic noticeboard
    By techman in forum AV and Multimedia Related
    Replies: 16
    Last Post: 10th February 2011, 09:44 PM
  4. zimbra as an exchange replacement
    By CyberNerd in forum Windows
    Replies: 10
    Last Post: 6th April 2006, 08:18 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •