Jump to content

Question: Win PE 2.0: automated build from BDD 2007 Beta


Recommended Posts

I have been working on a batch file to build Win PE 2.0 but I have not been able to build the ISO.

The concept from a blog.

Here is my batch file:

:: for use with BDD 2007 v3.0.41.0

::------Clean up.
rd /q /s winpe_x86

::------Initial PE build
cd "c:\program files\windows aik\tools\petools"
call copype.cmd x86 c:\winpe_x86

::------Add additional file to D: in PE (not on the RAM)
:: NOTE: These files show up on the “D:” drive after booting into WinPE.
:: The reason for putting additional tools here is to reduce the memory footprint of
:: WinPE. Everything in the X: drive is loaded into RAM at boot time!

::xcopy *.* c:\winpe_x86\iso /s/e/v/y
xcopy "C:\program files\Windows AIK\Tools\x86\*.*" c:\winpe_x86\iso /s/e/v/y

::------Customize PE

::Mount the WinPE WIM file:
imagex /apply c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount

::Install drivers
::peimg /inf=c:\drivers\vmware\vmxnet\win2k\vmware-nic.inf c:\winpe_x86\mount\Windows C:\winpe_x86_2>peimg /inf=c:\drivers\vmware\vmxnet\win2k\vmxnet.inf c:\winpe_x86\mount\Windows

::Install optional components
peimg /install=*srt* c:\winpe_x86\mount\windows

::shows currently installed optional packages
peimg /list c:\winpe_x86\mount\windows

::If you want ImageX (or any other utilities) in the RAM disk, put them there now:
xcopy "C:\program files\Windows AIK\Tools\x86\*.*" c:\winpe_x86\mount\windows\system32\*.* /s/e/v/y

::Prep the PE image
peimg /prep c:\winpe_x86\mount\Windows /f

::capture the mounted PE instace to a WIM
imagex /append c:\winpe_x86\mount c:\winpe_x86\winpe.wim "MyWinPE" /verify

::Export the appended image to a bootable WIM file:
imagex /boot /export /compress max c:\winpe_x86\winpe.wim 2 c:\winpe_x86\ISO\sources\boot.wim

::Create the Iso
oscdimg -n –bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

It seems to be failing at the line

imagex /boot /export /compress max c:\winpe_x86\winpe.wim 2 c:\winpe_x86\ISO\sources\boot.wim

Any help is appreciated.

Link to comment
Share on other sites

The error I recieve is "Error 5: Access is denied" from the oscdimg command.

This is the output from line (it does not really give a error message but it completes in a split second.... and I think it causes the next line in the batch script to fail).

imagex /boot /export /compress max c:\winpe_x86\winpe.wim 2 c:\winpe_x86\ISO\sources\boot.wim "MyWinPE"
C:\winpe_x86>imagex /boot /export /compress max c:\winpe_x86\winpe.wim 2 c:\winp
e_x86\ISO\sources\boot.wim "MyWinPE"

ImageX Tool for Windows
Copyright (C) Microsoft Corp. 1981-2005. All rights reserved.

Exporting: [c:\winpe_x86\winpe.wim, 2] ->

Progress: 100%

Successfully exported image #2.

The next line that actually returns a error is:

oscdimg -n –bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

C:\winpe_x86>oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x8

OSCDIMG 2.45 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2000. All rights reserved.
For Microsoft internal use only.

ERROR: Could not delete existing file "c:\winpe_x86\ISO"
Error 5: Access is denied.

Link to comment
Share on other sites

i know this will sound stupid but rewrite you command line for OSCDIMG, i had the same error cause i copied in parts of the command line (paths etc) and i got the same error, by typing everything in by hand it worked. don't know why but it did, give it a shot

Link to comment
Share on other sites

  • 3 months later...
possibly because of the vbcrlf in c:\winpe_x8


Actually the problem is that in the command in the document “Getting_Started_ITPro.rtf”, under “To create bootable Windows PE media”, step 5:

oscdimg -n –bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

the dash before ‘bc’ is not a normal dash (0x2D ansi), but is in fact an ‘En-Dash’ (0X96 ansi, 0x0x2013 unicode). As one might expect, when this is cut and pasted in a command window it looks perfect but oscdimg.exe does not grok it and gives forth:

ERROR: Could not delete existing file "c:\winpe_x86\ISO"

Error 5: Access is denied.

Which is, to say the least, not very helpful...

Link to comment
Share on other sites

  • 2 years later...
  • 1 year later...

I am running Windows 7 enterprise in Oracle VirtualBox . I am logged in as administrator. I have started the Application Manager service. I run the Deployment Kit command line as Administrator. I have adjusted the cmd console so I get the correct -. I am typing the command not pasting. I still get the "Error 5: Access Denied" message. Any other tips on what to do would be much appriciated.

The command I was using: oscdimg.exe -n -bc: \winpe\etfsboot.com c: \winpe\ISO c: \winpe\winpe.iso

I removed the "-b" files began copying. Then I got a message that read file to large... I then added a "-o" at the end to optimize and compress and this seemed to work.

Hope this helps someone else! :thumbup

Woops. Still got the file too large message. :no: Modified the "-o" to "-m" to override the file too large error. Now it really worked, YOOHOO!!! B)

OK. None of that worked. But want did work was using the MDT 2010 Update 1. Once I installed that everything worked great. :lol:

BTW, I don't know who moved my post, but the problem was with Win PE 3.0 not 2.0.

Edited by rdrussell
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...