[OPTIONS] Installing Windows on UEFI System with install.wim over 4 GB

Discussion in 'Windows 10' started by freddie-o, Mar 13, 2019.

  1. LittlePro

    LittlePro MDL Senior Member

    Jan 19, 2017
    388
    137
    10
    #21 LittlePro, Aug 25, 2019
    Last edited: Nov 13, 2019
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,354
    2,026
    210
    And that could be a useful batch for the same (it can run from WinPE which does not have Powershell):

    Code:
    @Echo off
    setlocal enabledelayedexpansion
    Set "USB="
    REM get removable loaded drives:
    for /f "tokens=1-5" %%a in (
     'wmic logicaldisk list brief'
    ) do if %%b Equ 2 if %%d gtr 0 Set USB=!USB! %%a
    Echo:Usb removable drives:%USB%
    EndLocal&Set USB=%USB:~1%&Goto :Eof
     
  3. LittlePro

    LittlePro MDL Senior Member

    Jan 19, 2017
    388
    137
    10
    #25 LittlePro, Aug 26, 2019
    Last edited: Nov 13, 2019
    Hi All,
    Greets,
    1.
    Sir,
    Thanks.
    To add : USB7ice is a great tool for creating a pen drive with any windows distributions where the biggest file or Install.wim is equal or less than 4 GB.
    It creates a media which is compatible with UEFI + GPT , UEFI CSM & Legacy bios ( MBR ).
    For eg. If a BIOS is configured for both ''UEFI + Legacy BIOS'', It will show two boot entries : One as UEFI & other as traditional Legacy USB entry.
    ( It reminds me of writing an ISO on a DVD. That uses FAT32 & is bootable on both UEFI & Legacy BIOS )

    2.
    Sir,
    The 1903 version's Install.wim was just under 4gb.

    3. What USB7ice actually does while using Standard BCD ( Vista & Vista + Distributions ) with FAT32 ( Default ): It simply formats a pen drive in FAT32 with single partition & simply extracts a windows distribution ISO to the root of USB Pen drive. That's it. It can be done manually as well.
    ( The trick was once shared by Sir Enthousiast )

    Thanks & Regards. ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    There's also Windows installation disk :)

    This script automates creating a customized Windows installation disk.

    • For both Legacy BIOS and the native UEFI boot process.
    • For systems that use UEFI with Secure Boot
    • Even for Windows ISOs that have Install.WIMs that are over 4GB (Due to the 4GB limitation of FAT32).
     
  5. GodHand

    GodHand MDL Addicted

    Jul 15, 2016
    534
    926
    30
    Code:
    Function Get-USBObject
    {
        [CmdletBinding()]
        [OutputType([PSCustomObject])]
        Param
        (
            [Parameter(Mandatory = $true,
                Position = 0)]
            [ValidateLength(1, 3)]
            [string]$DriveLetter
        )
    
        $DriveLetter = $DriveLetter.Substring(0, 1).ToUpper()
        Get-CimInstance -ClassName Win32_DiskDrive | Where-Object { $_.InterfaceType -eq 'USB' -and $_.MediaType -eq 'Removable Media' } | Sort-Object -Property DeviceID | ForEach-Object -Process {
            If ((Get-Partition -DiskNumber $_.Index).DriveLetter -eq $DriveLetter) { Get-Disk -Number $_.Index }
        }
    }
    So you can do $USB = (Get-USBObject -DriveLetter H) and it will add the disk object to the $USB variable.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,354
    2,026
    210
    No idea why you quoted me in that? If there is no PS, then Get-USBObject will not work anyway...
     
  7. LittlePro

    LittlePro MDL Senior Member

    Jan 19, 2017
    388
    137
    10
    #29 LittlePro, Nov 1, 2019
    Last edited: Nov 13, 2019
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. LittlePro

    LittlePro MDL Senior Member

    Jan 19, 2017
    388
    137
    10
    Sir,
    Greets,
    It was linked by Kyhi sir only. It has checksums provided by him only :

    SHA256 = 5E0EA09B00FCC15E40B6F11FFDC5014C40128CA89A3991F518DB92F40616543B

    If still required, I will delete the link.

    Let me know.

    Thanks & Regards. ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,685
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,440
    1,420
    60
    You are right, i posted the wrong script (for WinPE instead of Windows).
    Code:
    Echo Creating BCD entrys for Windows 64 UEFI
    
    set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
    
    Echo Creating ramdisksdidevice entry...
    for /f "tokens=2 delims={}" %%g in ('%BCDEDIT%  /create /device') do set ramdisk={%%g}
    %BCDEDIT%  /set %ramdisk% ramdisksdidevice        partition=G:
    %BCDEDIT%  /set %ramdisk% ramdisksdipath          \boot\boot.sdi
    
    Echo Adding RAM Boot WinFE entry...
    for /f "tokens=2 delims={}" %%g in ('%BCDEDIT%  /create /application osloader') do set GUID={%%g}
    %BCDEDIT%  /set %GUID% device                  ramdisk=[G:]\sources\boot.wim,%ramdisk%
    %BCDEDIT%  /set %GUID% path                    \Windows\System32\Boot\winload.efi
    %BCDEDIT%  /set %GUID% description             "Install Windows 64 UEFI"
    %BCDEDIT%  /set %GUID% osdevice                ramdisk=[G:]\sources\boot.wim,%ramdisk%
    %BCDEDIT%  /set %GUID% systemroot              \Windows
    %BCDEDIT%  /set %GUID% detecthal               Yes
    %BCDEDIT%  /set %GUID% winpe                   Yes
    %BCDEDIT%  /displayorder %guid% /addlast
    pause
    exit/b
    
     
  11. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    thanks friend very good job downloading now :good3:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...