Jump to content

WinPE - X: versus C: & D:


Recommended Posts

Posted

Background: I am using MDT to create an initial Vista "master" image. Once configured I save it as a .wim using imagex.

Goal: I want to use a (widely documented) WinPE media (DVD or UFD) to programmatically:

1) format the hard drive into C: and D: partitions using diskpart

2) use imagex to apply the previously captured image to the freshly formatted C: drive

Problem: When the WinPE media boots I do get an X: drive. But I also get a C: or D: drive that contains the

"ISO" portion of the WinPE media. The media mounts as C: if there is an unformatted hard disk. The media mounts

as D: if there is a previously formatted C: drive. EITHER of these drives (C: or D: ) interferes with my diskpart commands.

Is there a way to boot WinPE such that the non-X: portion does not interfere with C: and D:?

I can use one of the documented WinPE methods (startnet.cmd, unattend.xml, winpeshl.ini) to launch commands.

But those commands will fail if C: or D: is already mounted.

Perhaps I'm not creating the WinPE media correctly, maybe the mounted C: or D: data is not normal?

Thanks, Paul Schwotzer


Posted

I think I found this in this forum some time ago. It will change the CD-ROM drive to Z:.

echo list volume > X:\ListCD.txt
FOR /F "tokens=2,4" %%i IN ('diskpart /s X:\ListCD.txt') DO @IF /I %%j == AdminToolki SET CDROMVOL=%%i
IF DEFINED CDROMVOL echo select volume %CDROMVOL% > X:\ChangeCD.txt
IF DEFINED CDROMVOL echo assign letter=z: >> X:\ChangeCD.txt
IF DEFINED CDROMVOL diskpart /s X:\ChangeCD.txt

You'll need to change "AdminToolki" to whatever the volume name of your disc is keeping in mind that diskpart will only see the first 11 characters. That way both C: and D: should be free. If you place it in a batch file in one of the autorun locations you mentioned it should be automatic.

Cheers

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...