diff --git a/profiles/DerGeret/Windows/Setup.ps1 b/profiles/DerGeret/Windows/Setup.ps1 index 603fa45f..fe880f79 100644 --- a/profiles/DerGeret/Windows/Setup.ps1 +++ b/profiles/DerGeret/Windows/Setup.ps1 @@ -32,7 +32,7 @@ function Initialize-SetupConfig() { $installationPartition = Get-InstallationPartition; $installPartitionID = [int]$installationPartition.InnerText; - if (($installPartitionID -ge $From) -and (($null -eq $To) -or ($installPartitionID -lt $To))) { + if (($installPartitionID -ge $From) -and (($null -eq $To) -or ($installPartitionID -le $To))) { $installationPartition.InnerText = "$($installPartitionID + $By)"; } @@ -42,7 +42,7 @@ function Initialize-SetupConfig() { $order = [int]$orderNode.InnerText; $newOrder = $order; - if (($newOrder -ge $From) -and (($null -eq $To) -or ($newOrder -lt $To))) { + if (($newOrder -ge $From) -and (($null -eq $To) -or ($newOrder -le $To))) { $newOrder += $By; } @@ -57,7 +57,7 @@ function Initialize-SetupConfig() { $partitionID = [int]$partitionNode.InnerText; $newID = $partitionID; - if (($newID -ge $From) -and (($null -eq $To) -or ($newID -lt $To))) { + if (($newID -ge $From) -and (($null -eq $To) -or ($newID -le $To))) { $newID += $By; } @@ -99,16 +99,16 @@ function Initialize-SetupConfig() { [int]$To ) - Move-PartitionRange $From ($From + 1) (-1 * ($From + 1)) + Move-PartitionRange $From $From (-1 * ($From + 1)) if ($From -gt $To) { - Move-PartitionRange $To $From; + Move-PartitionRange $To ($From - 1); } elseif ($From -lt $To) { - Move-PartitionRange $From ($To + 1) -1; + Move-PartitionRange ($From + 1) $To -1; } - Move-PartitionRange -1 0 ($To + 1) + Move-PartitionRange -1 -1 ($To + 1) } }