New
#1
Install OS and format other hard disk if user prompt is yes
Hi Experts,
I am Bala, working on Windows 10 20H2 image creation and deployment, where i will be creating the wim file & using the wim file we will apply the image to pc. we are not using SCCM or MDT deployment since the PC will be deployed in a stand alone environments mostly. User of the PC will have the USB for OS installation.
I was using the bat file to complete the OS installation and making partitions. Now i have got an issue where i have more than 2 HDD(non RIAD) present in the pc, where operating system should be installed in disk 0 and if user gives input as Yes the Disk 1 and disk 2 should be formatted. where the number of disk might increase or decrease so i am looking to find is there a way where we can dynamically perform this operation.
Kindly suggest your inputs please.
Thanks
Balaji
- - - Updated - - -
Hi Experts,
I am using the below given for command for formatting the OS installation disk. using diskpart formatting the disk and os will be installed in disk 0.
"rem == 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 msr size=16
create partition primary
format quick fs=ntfs label="Windows"
assign letter="W"
list volume
exit "
for formatting additional disk i am using the below bat file
(
Echo select disk %1
Echo clean
Echo convert gpt
Echo create partition primary
Echo format quick fs=NTFS
Echo assign
Echo exit
)|Diskpart
exit /b
this formats the OS installed disk as well. so we need to find an option to that this skips the the OS installed disk.
Thanks
Balaji S