dawitz Posted June 29, 2015 Report post Posted June 29, 2015 I have a simple batch file to copy office templates from our share to user C drives. Here is the script\ @echo offrobocopy \\****\****\DataDeployment\OfficeTemplates\ "C:\Program Files (x86)\Microsoft Office\****" *.potx *.dotx /r:1 /w:1 The ***** are just me taking out relelvant company shares or name etc. However, on 4 or 5 machines the script will work and on about 20 others it fails. The folder exists in both cases. However, even if it didn't robocopy would create it. They error is 10006 16 Quote Share this post Link to post Share on other sites More sharing options...
Garrett804 Posted June 29, 2015 Report post Posted June 29, 2015 I don't know what that error number is but if you are using the machinename for the server UNC link and you have a DNS issue at all it could be faulting from some machines not having good DNS going to them. Try navigating to the source location UNC path on one of the failing ones to see if you can get to the files/folders. If that works then try manually running the command on that machine and see if it works manually even. Quote Share this post Link to post Share on other sites More sharing options...
dawitz Posted June 29, 2015 Report post Posted June 29, 2015 Garret, I tried that, I can navigate to the share ok on all systems. The interesting thing is that if I run the batch file on my system it works fine locally. if I go to another users machine who is having the issue via sccm and run the same batch file it fails. Quote Share this post Link to post Share on other sites More sharing options...
Garrett804 Posted June 30, 2015 Report post Posted June 30, 2015 Ok so on the machines with the issue you can't even manually run the file? You can however manually connect to the location via the UNC path from the problem machine? Quote Share this post Link to post Share on other sites More sharing options...
thaqeejaz Posted July 26, 2015 Report post Posted July 26, 2015 I am trying to deploy a integrated application through batch file, i can able to run the batch file without any problem, all the application i intended to install through the batch file it gets successively, but the thing here is all the time when the user startup the pc, it install every time, i want to include IF statement in the same script, as to rectify "If the file exist, it should exit" or else it should install the application.. I am doing this through GPO Startup option, i unable to complete the "IF cmd" here, could u please advise n help me what mistake am doing here in writing this batch file.... echomd c:\progra~1\planningecho y| cacls c:\progra~1\planning /G Everyone:fnet use \\192.168.1.15 123 /user:administratorset File = c:\progra~1\planning\eureka.batcd If not exist %File% Goto workcd If exist %File% Goto TheEnd:workcopy \\192.168.1.15\erp\eureka\eureka.bat c:\progra~1\planning\eureka.bat /ycopy \\192.168.1.15\erp\SSubTmr6.dll c:\progra~1\planning\SSubTmr6.dll /ycopy \\192.168.1.15\erp\eureka\FSPL-EUREKA-SETUP.bat c:\progra~1\planning\EUREKA-SETUP.bat /ycopy \\192.168.1.15\erp\vbalExpBar6.ocx c:\progra~1\planning\vbalExpBar6.ocx /ycopy \\192.168.1.15\erp\vbalIml6.ocx c:\progra~1\planning\vbalIml6.ocx /ycopy \\192.168.1.15\erp\regsvr32.bat c:\progra~1\planning\regsvr32.bat /ycopy \\192.168.1.15\erp\sys.bat c:\progra~1\planning\sys.bat /y@echo oncd C:\progra~1\planningstart EUREKA-SETUP.bat & eureka.bat@pausecmd /k:TheEndExit Note : without this "IF cmd" the same script work quite fine, but all here i want to run this file only once during startup, if the desired application is not exist in your system...If the same exist, the script should get exit without copying and gettng installed in user pc.... Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted July 27, 2015 Report post Posted July 27, 2015 Ok, I have to ask, why are you not include these files within the package and running the batch file locally, instead of mapping a drive? Why are you making your life difficult by using mapped drives/UNCs? 1 Quote Share this post Link to post Share on other sites More sharing options...
Garrett804 Posted July 29, 2015 Report post Posted July 29, 2015 If these clients have SCCM you could also just setup compliance for the applications and it will check against the compliance rules and either install it if they don't have it or just leave it alone if they do have it. Quote Share this post Link to post Share on other sites More sharing options...