[SOLVED] Multi-System WIMBoot via WinPE 5.1

Discussion in 'Scripting' started by xinso, Oct 6, 2014.

  1. xinso

    xinso MDL Guru

    Mar 5, 2009
    4,441
    5,569
    150
    #1 xinso, Oct 6, 2014
    Last edited by a moderator: Apr 20, 2017
    bios-diskpart.txt
    Code:
    select disk 0
    clean
    rem == 1. System partition (ESP) ===================
    create partition primary size=100
    format quick fs=ntfs label="System"
    assign letter="S"
    active
    rem == 2. Windows partition ========================
    create partition primary size=25000
    format quick fs=ntfs label="Default"
    assign letter="W"
    rem == 3. Windows partition ========================
    create partition primary
    format quick fs=ntfs label="Secondary"
    assign letter="Y"
    uefi-diskpart.txt
    Code:
    select disk 0
    clean
    convert gpt
    rem == 1. System partition (ESP) ===================
    create partition efi size=100
    format quick fs=fat32 label="System"
    assign letter="S"
    rem == 2. Microsoft Reserved (MSR) partition =======
    create partition msr size=128
    rem == 3. Windows partition ========================
    create partition primary size=25000
    format quick fs=ntfs label="Default"
    assign letter="W"
    rem == 4. Windows partition ========================
    create partition primary
    format quick fs=ntfs label="Secondary"
    assign letter="Y"
    startnet.cmd
    Code:
    rem === Copy boot files to the System partition =========
    set error=Copy boot files fail
    W:\Windows\System32\bcdboot W:\Windows /s S: /f ALL
    W:\Windows\System32\bcdboot Y:\Windows /d /addlast
    if %errorlevel% neq 0 goto Error

    Note:
    For detailed infomation, please refer to "bcdboot /?"