labguy Posted March 30, 2012 Report post Posted March 30, 2012 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. Quote Share this post Link to post Share on other sites More sharing options...
Jorgen Nilsson Posted March 30, 2012 Report post Posted March 30, 2012 Hi, 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. Regards, Jörgen 1 Quote Share this post Link to post Share on other sites More sharing options...
labguy Posted April 2, 2012 Report post Posted April 2, 2012 D'oh! Oh well, none of the other threads with this problem got solved, so hopefully this will be useful to someone else. Thanks! Quote Share this post Link to post Share on other sites More sharing options...