none
Win PE & Physical Drive Enumeration

    Question

  • Hello..

    I’ve been looking at an issue for the last couple of days that has me somewhat confused. I know there have been other posts regarding this but I’ve not yet seen a definitive reason behind it…unless I have missed it all togehter..

    We have a small number of systems in the environment that have two physical drives for example a 75GB drive and a 300GB drive, meaning the preferred setup would be:

    Disk 0 (75GB)

    200 MB: System reserved (bitlocker): Hidden Partition
    50GB: OSDisk: C Partition
    24GB: Data: D Partition

    Disk 1 (300GB)

    300GB: Extra: E Partition

    Can someone please explain why in Win PE these disks randomly swap between Disk 0 and Disk 1??

    I need to ensure that in a system refresh scenario these desktops only ever have W7 Enterprise installed to Disk 0 (in the example above) thus leaving Disk 1 alone.

    We are using the OSPart task sequence variable at the apply OS Phase so I am going to try to use the following script that I believe Niall had a hand in creating in order to target the current partition that has Windows installed:

    <job id="GetDriveletter">
    <script language="VBScript" src="..\ZTIUtility.vbs"/>
    <script language="VBScript">

    dim driveSearch
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set colDrives = objFSO.Drives

    For Each objDrive in colDrives

    driveSearch = objDrive.DriveLetter & ":\\Windows\\explorer.exe"

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colFiles = _
    objWMIService.ExecQuery("Select * From CIM_DataFile Where Name = '" & driveSearch & "'")

    If colFiles.Count < 1 Then

    Else
    oEnvironment.Item("OSPART") = objDrive.DriveLetter & ":"

    End If
    Next
    </script>
    </job>



    I would still very much appreciate any insight as to why the Disk numbers change at what seems to be random intervals….is it a hardware issue i.e. symptom of using SATA drives, or that OSD prefers the larger drive, or just a Win PE quirk...

    Thanks.

    Rich.

    Thursday, October 27, 2011 2:51 PM

Answers

All replies

  • Most likely just a WinPE quirk

    / Johan


    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch
    Monday, October 31, 2011 12:22 PM
  • Yes, concur with Johan.

    As I know when load into WinPE, disks marked from disk0 to diskN in the order in which they are enumerated.Therefore, the disk-assignment numbers may change between startups.

    So I think Niall's script is the best solution.

    Take a reference of the following links, and they seem to explain the reason:

    http://support.microsoft.com/kb/937251

    http://support.microsoft.com/kb/825668

    Hope this will help.

    Thanks

    • Marked as answer by stephensr Wednesday, September 19, 2012 1:30 PM
    Thursday, November 03, 2011 9:25 AM