From 2559625dcba199798a2f4eec2f22af684114fa75 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 3 Jul 2023 12:49:06 +0200 Subject: [PATCH] Add missing parameters to xml selections --- profiles/DerGeret/Windows/Setup.ps1 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/profiles/DerGeret/Windows/Setup.ps1 b/profiles/DerGeret/Windows/Setup.ps1 index 3dcd7869..bb1388ed 100644 --- a/profiles/DerGeret/Windows/Setup.ps1 +++ b/profiles/DerGeret/Windows/Setup.ps1 @@ -9,38 +9,38 @@ $Global:SetupConfigPostprocessor = { $namespace); $diskConfig = $setupComponent.SelectSingleNode("./ua:DiskConfiguration/ua:Disk", $namespace); - $installationPartition = $setupComponent.SelectSingleNode("./ua:ImageInstall/ua:OSImage/ua:InstallTo/ua:PartitionID"); + $installationPartition = $setupComponent.SelectSingleNode("./ua:ImageInstall/ua:OSImage/ua:InstallTo/ua:PartitionID", $namespace); $newIndex = [int]$installationPartition.InnerText; $installationPartition.InnerText = "$($newIndex + 1)"; - $partitionCreations = $diskConfig.SelectSingleNode("./ua:CreatePartitions"); + $partitionCreations = $diskConfig.SelectSingleNode("./ua:CreatePartitions", $namespace); $newPartition = $partitionCreations.FirstChild.CloneNode($true); - $newPartition.SelectSingleNode("./ua:Order").InnerText = "$newIndex"; - $newPartition.SelectSingleNode("./ua:Size").InnerText = "65536"; # For testing purposes + $newPartition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newIndex"; + $newPartition.SelectSingleNode("./ua:Size", $namespace).InnerText = "65536"; # For testing purposes for ($i = 0; $i -lt $partitionCreations.ChildNodes.Count; $i++) { $partition = $partitionCreations.ChildNodes[$i]; - $order = [int]$partition.SelectSingleNode("./ua:Order").InnerText; + $order = [int]$partition.SelectSingleNode("./ua:Order", $namespace).InnerText; if ($order -ge $newIndex) { - $partition.SelectSingleNode("./ua:Order").InnerText = "$($order + 1)"; + $partition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$($order + 1)"; } } $partitionCreations.AppendChild($newPartition); - $partitionModifications = $diskConfig.SelectSingleNode("./ua:ModifyPartitions"); + $partitionModifications = $diskConfig.SelectSingleNode("./ua:ModifyPartitions", $namespace); $newModification = $diskConfig.ChildNodes[2].CloneNode($true); - $newModification.SelectSingleNode("./ua:Order").InnerText = "$newIndex"; - $newModification.SelectSingleNode("./ua:PartitionID").InnerText = "$newIndex"; + $newModification.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newIndex"; + $newModification.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$newIndex"; for ($i = 0; $i -lt $partitionModifications.ChildNodes.Count; $i++) { $partition = $partitionModifications.ChildNodes[$i]; - $partitionID = [int]$partition.SelectSingleNode("./ua:PartitionID").InnerText; + $partitionID = [int]$partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText; if ($partitionID -ge $newIndex) { - $partition.SelectSingleNode("./ua:PartitionID").InnerText = "$($partitionID + 1)"; - $partition.SelectSingleNode("./ua:Order").InnerText = "$($partitionID + 1)"; + $partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$($partitionID + 1)"; + $partition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$($partitionID + 1)"; } }