Jump to content

Recommended Posts

I'm trying to create a package that just copies a few files, but no matter what I do in SCCM, it fails with exit code 4. Here's what I want to do:


xcopy "\\server\path\to\foo\*" "C:\Users\Public\Desktop\Foo\" /E /Y /C /I


Here's what I've tried:

  • Run it myself - Works
  • Put it in a batch script that creates C:\Users\Public\Desktop\Foo before running xcopy. Foo gets created but xcopy fails.
  • Run that batch script myself - Works
  • Uncheck "contains source files" and drop xcopy directly into the command line - fails
  • Create an everyone-full control folder on C:\ and tell SCCM to xcopy cmd.exe to C:\Folder - Works
  • xcopy \\server\...\foo\* C:\Folder - fails

I have the task set to run whether or not someone is logged in, but it's almost as if xcopy is ignoring it and refuses to write the files.




I've also tried to use robocopy, but the advertisement has stopped updating on the client. Wait, actually it looks like it requires a machine policy force, a reboot and 10 minutes to update. That can't be right. How do I make the client update faster?


I've spent two whole days troubleshooting this mess. It shouldn't be this hard to copy a folder.


Edit: Ok, so it finally updated to use robocopy, but that's failing with error 16: insufficient privileges.

Share this post

Link to post
Share on other sites


The sccm client uses the System account to run commnads on the client computers so make sure you have added permissions to the share for Domain Computers otherwise you will get access denied.



  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...