[WinPE] cdrom(0) how to get the drive letter ?

Discussion in 'Scripting' started by LiteOS, Jul 10, 2023.

  1. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,348
    1,053
    90
    Even the drive letter is E and D is used by another cdrom
    the cdrom is marked as cdrom(0) in the winpe registry [System\controlsetxx\control]
     
  2. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,015
    967
    90
    You could use diskpart, lis vol...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,348
    1,053
    90
    Ty for the reply

    yes but im wondering if there same variable that was made by the system
    so can be sure

    cos the letters Assigning is not gonna be
    cdrom(0) - D:\
    cdrom(1) - E:\

    mostly by the IDE / SCSI slot #
    and in the registry of WINPE, it will still called cdrom(0) or flashdrive(0)
     
  4. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,015
    967
    90
    What is your goal? What are you trying to achieve?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,348
    1,053
    90
    #5 LiteOS, Jul 12, 2023
    Last edited: Jul 12, 2023
    (OP)
    i want to make winpe that wont take so much memory
    so it would be best to put all the apps on the usb drive / cdrom not on the ramdisk

    i made simple winpe with explorer and few tools it increase to 900mb ram usage
     
  6. 12 lb Turkey

    12 lb Turkey MDL Member

    Nov 24, 2022
    121
    66
    10
    Code:
    wmic logicaldisk where volumename="CCCOMA_X64FRE_EN-US_DV9" get deviceid | find /v "DeviceID"
    D:
    
    Since you know the boot device's volume name.