locked
Copy package files during OSD RRS feed

  • Question

  • Hello all

    I am trying to copy files from a package to C:\XYZ during OSD. The  package contains several files.The program associated with this package is a cmd file that copies all the files to C:\XYZ.

    Here is the command I am using - xcopy.exe *.* C:\XYZ\ /E /D /Y /F.

    I am using this package in my OSD task sequence as part of Install Software step but this does not help me save the files from the package to the directory c:\xyz.

    Has anyone tried this or experience this before ? please help.

     

     

     

     

     

     

     

    Tuesday, March 22, 2011 4:58 PM

Answers

  • Why not use the step "Connect to network folder" in your Task Sequence? Give that one a drive letter (for example Z:), and choose "Run command line" after that. Then put the command "xcopy.exe Z:\*.* C:\Somedir /D /E /C /I /Q /H /R /Y /S" in that step.

    After "Setup Operating System and ConfigMgr" a reboot will take place, and steps like this must work then.


    My ConfigMgr blog: http://henkhoogendoorn.blogspot.com Follow me on Twitter: @henkhoogendoorn
    • Marked as answer by Shiva P Wednesday, March 23, 2011 10:39 PM
    • Unmarked as answer by Shiva P Wednesday, March 23, 2011 10:39 PM
    • Marked as answer by Robinson Zhang Thursday, April 7, 2011 2:33 AM
    Wednesday, March 23, 2011 10:38 PM

All replies

  • here's a good explanation of how to do it

    How can I copy files from a package using a task sequence
    Not as straightforward as you think

    hope that helps

    cheers

    niall



    My step by step SCCM Guides
    I'm on Twitter > ncbrady
    Tuesday, March 22, 2011 5:19 PM
  • Thanks Niall. I am doing an OSD task sequence and thats where I want to use files from a certain package.

    The example you've shared demonstrates creating two task sequences for the files in the package to be copied locally and advertising them seperately. How do I incorporate these two different task sequences with the OSD task sequence I am using.

     

    THanks again.

     

     

     

    Tuesday, March 22, 2011 8:24 PM
  • you change the advertisement settings or the file copy operations to hard code where to copy from ( the clever part here is the .\ infront of our path.), it's all in the post really :)

    cheers

    niall



    My step by step SCCM Guides
    I'm on Twitter > ncbrady
    Wednesday, March 23, 2011 1:55 PM
  • Niall

    I have used it just as mentioned in the article with a .\ but nothing got copied. In the article the command line for step "copy all files from package" is

    xcopy.exe ".\*.*" "c:\somedir" /D /E /C /I /Q /H /R /Y /S

    Shouldn't there be a cmd /c before xcopy.exe. I have tried both with and without cmd /c and no luck so far.

    My task sequence does a windows image deployment and the "Copy all files from package" step is used after "Set up operating system" group.

    Is there something I am doing wrong.

     

    Wednesday, March 23, 2011 5:06 PM
  • are you referencing a package in your step or not ?

    My step by step SCCM Guides
    I'm on Twitter > ncbrady
    Wednesday, March 23, 2011 5:54 PM
  • I am.
    Wednesday, March 23, 2011 6:00 PM
  • Why not use the step "Connect to network folder" in your Task Sequence? Give that one a drive letter (for example Z:), and choose "Run command line" after that. Then put the command "xcopy.exe Z:\*.* C:\Somedir /D /E /C /I /Q /H /R /Y /S" in that step.

    After "Setup Operating System and ConfigMgr" a reboot will take place, and steps like this must work then.


    My ConfigMgr blog: http://henkhoogendoorn.blogspot.com Follow me on Twitter: @henkhoogendoorn
    • Marked as answer by Shiva P Wednesday, March 23, 2011 10:39 PM
    • Unmarked as answer by Shiva P Wednesday, March 23, 2011 10:39 PM
    • Marked as answer by Robinson Zhang Thursday, April 7, 2011 2:33 AM
    Wednesday, March 23, 2011 10:38 PM
  • Hello henk

    I cannot use that because I have to export this task sequence to an USB media and hand over to the field staff. I am trying to copy some files from a package to the root (C:) These files are over 3 GB and thats an issue when my field staff uses this over the network which is why this is exported to an USB media.

     

     

     

    Wednesday, March 23, 2011 10:44 PM
  • My bad. THere was nothing wrong with the approach, my package had different hash table. I checked the smsts.log and it should me there was a hash table mismatch.

    Refreshed  the packaged on distribution point and tried the same thing again and it worked out. THanks Niall, you the man.

    Thursday, March 24, 2011 1:18 AM