Fix xcopy command to handle PPKG filenames with spaces

Adds proper quoting around file paths in the xcopy invocation to support PPKG filenames containing spaces. Without quoted paths, xcopy fails when filenames include whitespace characters.
This commit is contained in:
rbalsleyMSFT
2025-11-24 15:32:02 -08:00
parent 2a77cf1a02
commit 18367219c8
@@ -1464,7 +1464,8 @@ If ($PPKGFileToInstall) {
} }
WriteLog "Copying $PPKGFileToInstall to $USBDrive" WriteLog "Copying $PPKGFileToInstall to $USBDrive"
Write-Host "Copying $PPKGFileToInstall to $USBDrive" Write-Host "Copying $PPKGFileToInstall to $USBDrive"
Invoke-process xcopy.exe "$PPKGFileToInstall $USBDrive" # Quote paths to handle PPKG filenames with spaces
Invoke-process xcopy.exe """$PPKGFileToInstall"" ""$USBDrive"""
WriteLog "Copying $PPKGFileToInstall to $USBDrive succeeded" WriteLog "Copying $PPKGFileToInstall to $USBDrive succeeded"
Write-Host "Copying $PPKGFileToInstall to $USBDrive succeeded" Write-Host "Copying $PPKGFileToInstall to $USBDrive succeeded"
} }