Modify proper partitions
This commit is contained in:
parent
1c41cdd1c0
commit
36a663b897
1 changed files with 16 additions and 3 deletions
|
@ -59,10 +59,23 @@ $Global:SetupConfigPostprocessor = {
|
||||||
for ($i = 0; $i -lt $partitionModifications.ChildNodes.Count; $i++) {
|
for ($i = 0; $i -lt $partitionModifications.ChildNodes.Count; $i++) {
|
||||||
$partition = $partitionModifications.ChildNodes[$i];
|
$partition = $partitionModifications.ChildNodes[$i];
|
||||||
$partitionID = [int]$partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText;
|
$partitionID = [int]$partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText;
|
||||||
|
$newID = $partitionID;
|
||||||
|
|
||||||
if ($partitionID -ge $newIndex) {
|
if ($partitionID -eq 2) {
|
||||||
$partition.SelectSingleNode("./ua:PartitionID", $namespace).InnerText = "$($partitionID + 1)";
|
$newID--;
|
||||||
$partition.SelectSingleNode("./ua:Order", $namespace).InnerText = "$($partitionID + 1)";
|
} 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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue