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++) {
|
||||
$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";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue