/build/static/layout/Breadcrumb_cap_w.png

XCOPY batch file does not run for non-admins

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
EXIT

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

-Adam


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: quattro004 9 years ago
Orange Belt
0

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.

Posted by: SMal.tmcc 9 years ago
Red Belt
0
put the files you want to copy on a server share that all domain users have read rights to and copy from that source

Comments:
  • 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. - quattro004 9 years ago
    • 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
      EXIT - SMal.tmcc 9 years ago
Posted by: EdT 9 years ago
Red Belt
0
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.

Comments:
  • 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. - 786_ak 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ