diff --git a/profiles/DerGeret/Windows/Setup.ps1 b/profiles/DerGeret/Windows/Setup.ps1
index b6e261c1..621d2c7c 100644
--- a/profiles/DerGeret/Windows/Setup.ps1
+++ b/profiles/DerGeret/Windows/Setup.ps1
@@ -5,11 +5,15 @@ $env:SETUP_SCRIPT_NAME = [System.IO.Path]::GetRelativePath("$PSScriptRoot/../../
 $Global:SetupConfigPostprocessor = {
     param([xml] $config, [System.Xml.XmlNamespaceManager] $namespace)
 
-    $diskConfig = $config.SelectSingleNode(
-        "/ua:unattend/ua:settings[@pass='windowsPE']/ua:component[@name='Microsoft-Windows-Setup']/ua:DiskConfiguration/ua:Disk",
+    $setupComponent = $config.SelectSingleNode(
+        "/ua:unattend/ua:settings[@pass='windowsPE']/ua:component[@name='Microsoft-Windows-Setup']",
         $namespace);
 
-    $newIndex = 4;
+    $diskConfig = $setupComponent.SelectSingleNode("./ua:DiskConfiguration/ua:Disk", $namespace);
+    $installationPartition = $setupComponent.SelectSingleNode("./ua:ImageInstall/ua:OSImage/ua:InstallTo/ua:PartitionID");
+
+    $newIndex = [int]$installationPartition.InnerText;
+    $installationPartition.InnerText = "$($newIndex + 1)";
     $partitionCreations = $diskConfig.SelectSingleNode("./ua:CreatePartitions");
     $newPartition = $partitionCreations.FirstChild.CloneNode($true);
     $newPartition.SelectSingleNode("./ua:Order").InnerText = "$newIndex";