mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Added cleanup of Win32 and MSStore folders
This commit is contained in:
@@ -3038,7 +3038,15 @@ function Get-FFUEnvironment {
|
||||
Remove-Item -Path $EdgePath -Recurse -Force
|
||||
WriteLog 'Removal complete'
|
||||
}
|
||||
|
||||
if (Test-Path -Path "$AppsPath\Win32" -PathType Container) {
|
||||
WriteLog "Cleaning up Win32 folder"
|
||||
Remove-Item -Path "$AppsPath\Win32" -Recurse -Force
|
||||
}
|
||||
if (Test-Path -Path "$AppsPath\MSStore" -PathType Container) {
|
||||
WriteLog "Cleaning up MSStore folder"
|
||||
Remove-Item -Path "$AppsPath\MSStore" -Recurse -Force
|
||||
}
|
||||
Clear-InstallAppsandSysprep
|
||||
Writelog 'Removing dirty.txt file'
|
||||
Remove-Item -Path "$FFUDevelopmentPath\dirty.txt" -Force
|
||||
WriteLog "Cleanup complete"
|
||||
@@ -3600,6 +3608,20 @@ catch {
|
||||
Writelog "Cleaning up InstallAppsandSysprep.cmd failed with error $_"
|
||||
throw $_
|
||||
}
|
||||
try {
|
||||
if (Test-Path -Path "$AppsPath\Win32" -PathType Container) {
|
||||
WriteLog "Cleaning up Win32 folder"
|
||||
Remove-Item -Path "$AppsPath\Win32" -Recurse -Force
|
||||
}
|
||||
if (Test-Path -Path "$AppsPath\MSStore" -PathType Container) {
|
||||
WriteLog "Cleaning up MSStore folder"
|
||||
Remove-Item -Path "$AppsPath\MSStore" -Recurse -Force
|
||||
}
|
||||
}
|
||||
catch {
|
||||
WriteLog "$_"
|
||||
throw $_
|
||||
}
|
||||
#Create Deployment Media
|
||||
If ($CreateDeploymentMedia) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user