Hey all.
I am currently trying to write a script to deploy windows 10 from a wim file in a PE env. The script I have works for windows 7 but does not function when I try to modify it for windows 10. Here is the script as it is for deployment of 7:
Ok so the main batch:
diskpart /s diskpart.txt & copy install.wim R: & Dism /apply-image /imagefile:R:\install.wim /index:2 /applydir:W:\ & S: & md Recovery\WindowsRE & attrib W:\windows\system32\recovery\winre.wim -h -s & copy W:\windows\system32\recovery\winre.wim S:\Recovery\WindowsRE & attrib W:\windows\system32\recovery\winre.wim +h +s & bcdboot W:\Windows /s S: /f BIOS & BootSect /nt60 s: /mbr /force
the diskpart file:
select disk 0
clean
create partition primary size=1000
format quick fs=ntfs label="System"
assign letter="S"
active
create partition primary
shrink minimum=32000
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
exit
This works 100% with windows 7 wims. I have had it work once with a 10 wim. Things I have tried to get it working with all 10 wims, I added a "convert mbr" in the diskpart script after "clean" as well as edited bcdboot part of the main batch so it is "bcdboot W:\Windows /s S: /f ALL", I also tried turning off secure boot before running the script. None of these seem to work. Not sure if there is a way to deploy a 10 image from a wim...
I am currently trying to write a script to deploy windows 10 from a wim file in a PE env. The script I have works for windows 7 but does not function when I try to modify it for windows 10. Here is the script as it is for deployment of 7:
Ok so the main batch:
diskpart /s diskpart.txt & copy install.wim R: & Dism /apply-image /imagefile:R:\install.wim /index:2 /applydir:W:\ & S: & md Recovery\WindowsRE & attrib W:\windows\system32\recovery\winre.wim -h -s & copy W:\windows\system32\recovery\winre.wim S:\Recovery\WindowsRE & attrib W:\windows\system32\recovery\winre.wim +h +s & bcdboot W:\Windows /s S: /f BIOS & BootSect /nt60 s: /mbr /force
the diskpart file:
select disk 0
clean
create partition primary size=1000
format quick fs=ntfs label="System"
assign letter="S"
active
create partition primary
shrink minimum=32000
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
exit
This works 100% with windows 7 wims. I have had it work once with a 10 wim. Things I have tried to get it working with all 10 wims, I added a "convert mbr" in the diskpart script after "clean" as well as edited bcdboot part of the main batch so it is "bcdboot W:\Windows /s S: /f ALL", I also tried turning off secure boot before running the script. None of these seem to work. Not sure if there is a way to deploy a 10 image from a wim...