How Can I Switch Unattend.xml Files Based on RAID Status During Windows Setup?
Asked by
puzzle.703
Hi everyone! I'm working on streamlining my system deployments and need some advice. I'm trying to set up my unattended Windows installer so that it can automatically switch between two different unattend.xml files before the installation begins. Ideally, I'd like it to use Unattend_A.xml if RAID is active, and Unattend_B.xml when RAID is inactive (like when using AHCI, NVME, or SCSI). I've attempted to modify startnet.cmd to point to a batch script that detects the RAID status and copies the correct unattend file to the root directory, but it's not working. I've stored my unattend files in a folder within the installer root. Can anyone help me figure out how to get this working? I've spent hours researching without success. Thanks!
Answers
What specific differences does the unattend.xml have related to RAID? Have you considered just adding the RAID driver to your image and keeping the unattend file unchanged?
Reply to this answer
If you don't strictly need RAID for your devices, you might want to consider switching the SATA controller in the BIOS to AHCI. Itโs probably a simpler solution than trying to script this whole process.
+all in favor: For my current fleet, changing the SATA settings would be a bit inefficient. I need to stick with RAID for various reasons.
Reply to this answer
So, if I understood you right, you're looking to dynamically select which unattend.xml file to use based on the RAID status during the WinPE phase, right? Are you specifically referring to autounattend.xml?
+all in favor: Yes, that's exactly what I'm trying to do!
Reply to this answer
Add your answer
Answers are reviewed before publication.
+all in favor: The only difference I noticed is that when RAID is active, diskid is set to 1; if not, itโs 0. That's really the only distinction.