diff --git a/profiles/DerGeret/Windows/Setup.ps1 b/profiles/DerGeret/Windows/Setup.ps1 index 9ac5a5e6..e347c1ce 100644 --- a/profiles/DerGeret/Windows/Setup.ps1 +++ b/profiles/DerGeret/Windows/Setup.ps1 @@ -59,10 +59,23 @@ $Global:SetupConfigPostprocessor = { for ($i = 0; $i -lt $partitionModifications.ChildNodes.Count; $i++) { $partition = $partitionModifications.ChildNodes[$i]; $partitionID = [int]$partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText; + $newID = $partitionID; - if ($partitionID -ge $newIndex) { - $partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$($partitionID + 1)"; - $partition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$($partitionID + 1)"; + if ($partitionID -eq 2) { + $newID--; + } else { + if ($partitionID -ge $newIndex) { + $newID++; + } + + if ($partitionID -lt 2) { + $newID++; + } + } + + if ($partitionID -ne $newID) { + $partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$newID"; + $partition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$newID"; } }