When copying from the network into c:\windows\inf manually I need to copy the files to a local folder first, then copy from the local folder into the inf folder. I need to do this with a batch file, but it still errors even when the batch tries to copy from C:\tools\mydrivers\6440 to C:\windows\inf\mydrivers\6440 with Access denied.

How can I copy files from the network into C:\windows\inf?
This occurs as a mid-level task.

Thanks
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
here is my method to copy drivers as mid level.

create a zip file that contains the drivers you want to copy along with these 2 other files.


copy.vbs
CreateObject("Wscript.Shell").Run "copy.bat",0,True
copy.bat
md C:\Windows\inf\tmccdrivers\t440p

xcopy .\t440p\*.* C:\Windows\inf\tmccdrivers\t440p /s /q /y

create a post application task


Answered 12/16/2014 by: SMal.tmcc
Red Belt

  • I was hoping you'd post your method. What is the reason you use a .vbs to call the .bat, instead of launching the .bat directly?
    • you cannot upload a zip to a batch task but an application task will allow this. The application task is looking for an application to run not a batch file. So by calling a vbscript I give it that. you could write the vb script to do the md and xcopy command but a batch is easier to understand and change when needed. you can make the xcopy window show by changing the vb script
      • Ah, makes sense. Thanks for explaining!
  • So far, I've gotten it to copy the top level folder, but it won't copy the driver files or sub folders. Any idea why it would only get the top folder out of the zip?
    • did you use a pattern like I did? and use the /s switch and you need the *.* in the pattern (there is a dot in front of \t440)
      xcopy .\t440p\*.* C:\Windows\inf\tmccdrivers\t440p /s /q /y
Please log in to comment
Answer this question or Comment on this question for clarity