I've been trying to make a usb-stick that will be able to do an unattended installation of windows on both BIOS and UEFI based systems,
But I'm kind of stuck. currently i can automate winPE to format a disk with the correct partitions by modifying startnet.cmd and adding two text files
wpeutil UpdateBootInfo
for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B
@if %Firmware%==0x1 diskpart /s CreatePartitions-BIOS.txt
@if %Firmware%==0x2 diskpart /s CreatePartitions-UEFI.txt
(CreatePartitions-BIOS.txt)
select disk 0
clean
convert mbr
create partition primary size=100
format quick fs=ntfs label="System"
assign letter="S"
active
create partition primary
shrink minimum=500
format quick fs=ntfs label="Windows"
assign letter="W"
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id=27
list volume
exit
(CreatePartitions-UEFI.txt)
select disk 0
clean
convert gpt
create partition efi size=100
format quick fs=fat32 label="System"
assign letter="S"
create partition primary
shrink minimum=500
format quick fs=ntfs label="Windows"
assign letter="W"
create partition msr size=16
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit
I set the windows partition as second, and make the unattend.xml without DiskConfiguration and set to install to partition 2.
All of this is working fine if i boot into winPE, then reboot into my windows iso.
From my understanding, windows install media uses winPE? is there a way to bake the script shown above into my windows iso?
I've tried to load boot.wim and install.wim and placed the scripts at Windows\system32 like i did with the winPE iso, but it doesn't seem to be doing anything
I'm very new to all of this, sorry if I'm missing anything obvious
But I'm kind of stuck. currently i can automate winPE to format a disk with the correct partitions by modifying startnet.cmd and adding two text files
wpeutil UpdateBootInfo
for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B
@if %Firmware%==0x1 diskpart /s CreatePartitions-BIOS.txt
@if %Firmware%==0x2 diskpart /s CreatePartitions-UEFI.txt
(CreatePartitions-BIOS.txt)
select disk 0
clean
convert mbr
create partition primary size=100
format quick fs=ntfs label="System"
assign letter="S"
active
create partition primary
shrink minimum=500
format quick fs=ntfs label="Windows"
assign letter="W"
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id=27
list volume
exit
(CreatePartitions-UEFI.txt)
select disk 0
clean
convert gpt
create partition efi size=100
format quick fs=fat32 label="System"
assign letter="S"
create partition primary
shrink minimum=500
format quick fs=ntfs label="Windows"
assign letter="W"
create partition msr size=16
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit
I set the windows partition as second, and make the unattend.xml without DiskConfiguration and set to install to partition 2.
All of this is working fine if i boot into winPE, then reboot into my windows iso.
From my understanding, windows install media uses winPE? is there a way to bake the script shown above into my windows iso?
I've tried to load boot.wim and install.wim and placed the scripts at Windows\system32 like i did with the winPE iso, but it doesn't seem to be doing anything
I'm very new to all of this, sorry if I'm missing anything obvious