File creation error with Deployment and Imaging Environment

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).

February 3rd, 2013 3:46pm

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

Thank you

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 10:10am

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.


September 12th, 2013 4:36pm

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.

Free Windows Admin Tool Kit Click here and download it now
April 14th, 2014 12:49pm

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.

September 3rd, 2014 7:17pm

Hello,

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

David

Free Windows Admin Tool Kit Click here and download it now
March 5th, 2015 1:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics