# Disk configuration (auto-partition) disk_config = ET.SubElement(component, "DiskConfiguration") ET.SubElement(disk_config, "WillShowUI").text = "OnError" disk = ET.SubElement(disk_config, "Disk", wcm_action="add") ET.SubElement(disk, "DiskID").text = "0" ET.SubElement(disk, "WillWipeDisk").text = "true" partition = ET.SubElement(disk, "CreatePartition", wcm_action="add") ET.SubElement(partition, "Order").text = "1" ET.SubElement(partition, "Size").text = "100" # MB (System Reserved) ET.SubElement(partition, "Type").text = "Primary" # + more partitions for Windows
auto_login = ET.SubElement(oobe_comp, "AutoLogon") ET.SubElement(auto_login, "Password").text = admin_password ET.SubElement(auto_login, "Username").text = "Administrator"
# 2. oobeSystem phase (auto-login & skip OOBE) oobe = ET.SubElement(unattend, "settings", pass="oobeSystem") oobe_comp = ET.SubElement(oobe, "component", name="Microsoft-Windows-Shell-Setup")