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 ...
1st August 2012, 09:50 PM #1
Using Robocopy as an SCCM 2012 package Reporting back as failed when it hasn't
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?
1st August 2012, 09:57 PM #2
Robocopy probably isn't giving a correct exit code. You may have to use some kind of script wrapper to pass the desirable code.
1st August 2012, 11:06 PM #3
add the reported correct safe error codes to the sccm package.
1st August 2012, 11:20 PM #4
Hi @ChrisH & @Theblacksheep please can you expand a little please? Do you know how i can do these steps please?
1st August 2012, 11:48 PM #5
If you can use multiple lines you should be able to do:
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
1st August 2012, 11:49 PM #6
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.
Originally Posted by FN-GM
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.
Thanks to Theblacksheep from:
1st August 2012, 11:59 PM #7
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.
2nd August 2012, 12:09 AM #8
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.
2nd August 2012, 11:39 AM #9
@ChrisH i cant find this in SCCM 2012 but where can i change the default exit codes on a package please?
2nd August 2012, 12:30 PM #10
@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.
By gshaw in forum Enterprise Software
Last Post: 18th January 2012, 05:13 PM
By pete in forum Enterprise Software
Last Post: 7th June 2011, 02:17 PM
By techman in forum AV and Multimedia Related
Last Post: 10th February 2011, 10:44 PM
By CyberNerd in forum Windows
Last Post: 6th April 2006, 09:18 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)