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, 08:50 PM #1 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
-
-
IDG Tech News
-
1st August 2012, 08: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, 10:06 PM #3 add the reported correct safe error codes to the sccm package.
-
-
1st August 2012, 10:20 PM #4 Hi @ChrisH & @Theblacksheep please can you expand a little please? Do you know how i can do these steps please?
Thanks
-
-
1st August 2012, 10:48 PM #5 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
-
-
1st August 2012, 10:49 PM #6 
Originally Posted by
FN-GM
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.
-
Thanks to Theblacksheep from:
-
1st August 2012, 10: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.
-
-
1st August 2012, 11:09 PM #8 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
-
-
2nd August 2012, 10:39 AM #9 @ChrisH i cant find this in SCCM 2012 but where can i change the default exit codes on a package please?
Thanks
-
-
2nd August 2012, 11:30 AM #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.
-
SHARE: 
Similar Threads
-
By gshaw in forum Enterprise Software
Replies: 14
Last Post: 18th January 2012, 04:13 PM
-
By pete in forum Enterprise Software
Replies: 1
Last Post: 7th June 2011, 01:17 PM
-
By techman in forum AV and Multimedia Related
Replies: 16
Last Post: 10th February 2011, 09:44 PM
-
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
-
Forum Rules