none
File creation error with Deployment and Imaging Environment RRS feed

  • Question

  • I'm following this step by step guide here:
    http://technet.microsoft.com/en-us/library/hh825212.aspx

    I've installed all the required software in the guide on my Windows 7 x86 machine. I'm using two USB keys, one 4GB and the other 8GB. I've tried copy pasting the commands and typing them by hand, both fail with the following error:

    C:\winpe_amd64>MakeWinPEMedia /UFD C:\winpe_amd64 U:
    WARNING, ALL DATA ON DISK DRIVE B: WILL BE LOST!
    Proceed with Format [Y,N]?Y
    Formatting U:...
    Setting the boot code on U:...
    Copying files to U:...
    File creation error - The parameter is incorrect.
    Unable to create directory - U:\
    ERROR: Failed to copy files to U:\.
    C:\winpe_amd64>

    I want to create a PE environment for UEFI (FAT32).

    Sunday, February 3, 2013 3:46 PM

Answers

  • I had the same problem.

    The problem lies with the MakeWinPEMedia.cmd

    After the script partitions and reformats the flash drive, the disk appears offline for about 10 seconds (can be verified if you have Explorer open). This for some reason messes up XCOPY in the way the command is written.

    SOLUTION:

    Open MakeWinPEMedia.cmd using notepad (notepad "C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\MakeWinPEMedia.cmd")

    REPLACE:

      xcopy /herky "%WORKINGDIR%\%TEMPL%" "%DEST%\" >NUL

    WITH

      xcopy /herky "%WORKINGDIR%\%TEMPL%\*.*" "%DEST%\*.*" >NUL

    notice the \*.* at two places, thats what somehow makes XCOPY wait for the disk to be ready and then copies the files.


    • Edited by jk sdkfj Thursday, September 12, 2013 4:38 PM update command
    • Proposed as answer by Andre.Ziegler Thursday, September 12, 2013 6:37 PM
    • Marked as answer by Michael_MartinModerator Tuesday, April 22, 2014 5:00 PM
    Thursday, September 12, 2013 4:36 PM

All replies

  • May you advice which step did you stop at also the most recent command that you have been using for create winPE

    Thank you

    Thursday, February 7, 2013 10:10 AM
  • I had the same problem.

    The problem lies with the MakeWinPEMedia.cmd

    After the script partitions and reformats the flash drive, the disk appears offline for about 10 seconds (can be verified if you have Explorer open). This for some reason messes up XCOPY in the way the command is written.

    SOLUTION:

    Open MakeWinPEMedia.cmd using notepad (notepad "C:\Program Files\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\MakeWinPEMedia.cmd")

    REPLACE:

      xcopy /herky "%WORKINGDIR%\%TEMPL%" "%DEST%\" >NUL

    WITH

      xcopy /herky "%WORKINGDIR%\%TEMPL%\*.*" "%DEST%\*.*" >NUL

    notice the \*.* at two places, thats what somehow makes XCOPY wait for the disk to be ready and then copies the files.


    • Edited by jk sdkfj Thursday, September 12, 2013 4:38 PM update command
    • Proposed as answer by Andre.Ziegler Thursday, September 12, 2013 6:37 PM
    • Marked as answer by Michael_MartinModerator Tuesday, April 22, 2014 5:00 PM
    Thursday, September 12, 2013 4:36 PM
  • I have confirmed this solution works. I added the *.* to the end of both paths and the USB key was created successfully. I am not sure as to the reason though.  Before trying your solution I simply added a timeout command before the xcopy command. I gave it 15 seconds, more than enough to re-initialize the USB device but the error still happened.

    In any event, I'm happy it now works and that I can avoid the messy diskpart commands to make keys bootable.

    Monday, April 14, 2014 12:49 PM
  • This solution didn't work for me. My install.wim file is 12.1 GB so i guess the problem is MakeWinPEMedia.cmd formats the USB Drive FAT32.

    How can i workaround this issue?

    Thanks in advance.

    Wednesday, September 3, 2014 7:17 PM
  • Hello,

    Had same issue just now (Mar2015), and your fix worked like a charm.  How can I Paypal you $20 for your genius?

    David

    Thursday, March 5, 2015 6:03 AM