Update BuildFFUVM.ps1

- Fix accidental variable accumulation in InstallAppsandSysprep.cmd
This commit is contained in:
JonasKloseBW
2024-09-26 20:08:47 +02:00
committed by GitHub
parent 6a0faa958e
commit 5545554d7e
+1 -3
View File
@@ -4030,8 +4030,7 @@ if ($InstallApps) {
WriteLog "Update complete" WriteLog "Update complete"
} }
if (-not $AppsScriptVariables) { #Modify InstallAppsandSysprep.cmd to remove old script variables
#Modify InstallAppsandSysprep.cmd to remove the script variables
$CmdContent = Get-Content -Path "$AppsPath\InstallAppsandSysprep.cmd" $CmdContent = Get-Content -Path "$AppsPath\InstallAppsandSysprep.cmd"
$StartIndex = $CmdContent.IndexOf("REM START Batch variables placeholder") $StartIndex = $CmdContent.IndexOf("REM START Batch variables placeholder")
$EndIndex = $CmdContent.IndexOf("REM END Batch variables placeholder") $EndIndex = $CmdContent.IndexOf("REM END Batch variables placeholder")
@@ -4041,7 +4040,6 @@ if ($InstallApps) {
} }
} }
Set-Content -Path "$AppsPath\InstallAppsandSysprep.cmd" -Value $CmdContent Set-Content -Path "$AppsPath\InstallAppsandSysprep.cmd" -Value $CmdContent
}
if ($AppsScriptVariables) { if ($AppsScriptVariables) {
#Modify InstallAppsandSysprep.cmd to add the script variables #Modify InstallAppsandSysprep.cmd to add the script variables