2 Replies Latest reply: Feb 25, 2012 3:56 AM by Frank Wils RSS

    Batch file to copy file/folder to user desktop giving errors

    Rookie

      Hi all,

       

      I'm having some issues trying to deploy a batch file that will copy some powerpoint, excel, and word templates to their desktops. (We just had a rebranding)

       

      On my test machines, the batch file runs fine for both Windows XP and Windows 7. I don't know what the problem is here as the batch files work fine without LANDesk, but when I go to distribute the task through LANDesk I get a "Package deployment failed" and a Return code 4.

       

      Everyone has access to this share, I'm using a policy supported push, and I tried sifting through the log files with no real answer for why it isn't deploying.

       

      I still haven't been able to find documentation on return code 4 as well.

       

      Here's my scripting for both OS's:

       

      Windows 7:

       

      @ECHO ON
      ::Copies files to dekstop of current user *For Windows 7

      xcopy "\\networkshare\tempstorage\Templates" "%systemdrive%\users\%username%\Desktop\Templates\" /O /X /E /H /K

       

      Windows XP:

      xcopy "\\networkshare\tempstorage\Templates" "%userprofile%\Desktop\Templates\" /O /X /E /H /K

       

       

      Would appreciate any help in this matter!

       

      Thanks.