Trying to use XCOPY in a batch file to copy a directory and a file into %APPDATA% for each user that signs into a machine. Using SCCM 2012 SP1 R1 to deploy. Built as a package/program and runs with users rights, install runs once per user logon on the machine. The deployment is set to install from the DP. I think my issue is that non-admin users don't have rights to copy files from the DP to the Roaming folder in %APPDATA%. The same case is likely if I were to set the deployment to download and install locally, I think I would still hit the same issue not having rights to copy files from the ccmcache folder to %APPDATA%.

I am trying to sort out what I need to modify in either the script that runs or the deployment in SCCM.

Here is the script that runs in the batch file...

@echo off
XCOPY "source_filepath" "%APPDATA%\SketchUp\SketchUp 2014\SketchUp\Plugins" /Q /R /Y /S /I

I am open to any suggestions on how I can make this work.


Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



Took a bit of a break on this as we've been deploying Office 2013 company wide. I think I've got it working.

It's still a batch file called from a Package/Program in SCCM.

.BAT file runs the following script..

if not exist "%APPDATA%\SketchUp\SketchUp 2014\SketchUp\Plugins" md "%APPDATA%\SketchUp\SketchUp 2014\SketchUp\Plugins"
XCOPY /y /e "%~dp0SNPFiles\*.*" "%APPDATA%\SketchUp\SketchUp 2014\SketchUp\Plugins"

I used the basic script structure from one I found here (http://blog.configmgrftw.com/copying-files-to-clients-using-configmgr/). Then modified the directoies to fit my needs. the %~dp0 keeps me from having to hard code the source file location in the script.

Program config in SCCM is as follows..

Runs Hidden, only when a user is logged in, with user's rights, UNC name, runs once for every user who logs in. Does the trick through Software Center for both Admin and Non-Admin accounts.

Thanks again for the help guys. If I didn't take your advice directly it still helped steer me in a direction that works for me.

Answered 10/17/2014 by: quattro004
Orange Belt

Please log in to comment
put the files you want to copy on a server share that all domain users have read rights to and copy from that source
Answered 09/25/2014 by: SMal.tmcc
Red Belt

  • I have done that from time to time, but in general that is something I try to avoid since we don't make a habit of storing all of our software install files in user facing directories. If I exhaust all other possibilities then I don't have a huge issue with resorting to that. Thanks for the comment.
    • you can create a read only user to the area you want and use a "net use" command to map a drive to the server via that user in your batch file then xcopy from that drive source

      @echo off
      start /wait net use x: \\sccmserver\ccmcache /user:domain\installer password
      start /wait XCOPY "x:\source_filepath" "%APPDATA%\SketchUp\SketchUp 2014\SketchUp\Plugins" /Q /R /Y /S /I
      start /wait net use x: /delete
Please log in to comment
You could also deploy the files to a local folder on the machine and then use something like active setup to copy them to the user folder at next login.
Answered 09/25/2014 by: EdT
Red Belt

  • I have used this method successfully on several occasions and currently using it for Java 7.0.67. So quattro004, you should consider what EdT has suggested.
Please log in to comment