Ensure proper XML elements are evaluated

This commit is contained in:
Manuel Thalmann 2023-07-03 12:59:55 +02:00
parent 2559625dcb
commit cb1a0a8e4b

View file

@ -14,7 +14,7 @@ $Global:SetupConfigPostprocessor = {
$newIndex = [int]$installationPartition.InnerText; $newIndex = [int]$installationPartition.InnerText;
$installationPartition.InnerText = "$($newIndex + 1)"; $installationPartition.InnerText = "$($newIndex + 1)";
$partitionCreations = $diskConfig.SelectSingleNode("./ua:CreatePartitions", $namespace); $partitionCreations = $diskConfig.SelectSingleNode("./ua:CreatePartitions", $namespace);
$newPartition = $partitionCreations.FirstChild.CloneNode($true); $newPartition = $partitionCreations.SelectNodes("./ua:CreatePartition", $namespace)[0].CloneNode($true);
$newPartition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newIndex"; $newPartition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newIndex";
$newPartition.SelectSingleNode("./ua:Size", $namespace).InnerText = "65536"; # For testing purposes $newPartition.SelectSingleNode("./ua:Size", $namespace).InnerText = "65536"; # For testing purposes
@ -30,7 +30,7 @@ $Global:SetupConfigPostprocessor = {
$partitionCreations.AppendChild($newPartition); $partitionCreations.AppendChild($newPartition);
$partitionModifications = $diskConfig.SelectSingleNode("./ua:ModifyPartitions", $namespace); $partitionModifications = $diskConfig.SelectSingleNode("./ua:ModifyPartitions", $namespace);
$newModification = $diskConfig.ChildNodes[2].CloneNode($true); $newModification = $diskConfig.SelectNodes("./ua:ModifyPartition", $namespace)[2].CloneNode($true);
$newModification.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newIndex"; $newModification.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newIndex";
$newModification.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$newIndex"; $newModification.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$newIndex";