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
|
Remove-Item -Path $EdgePath -Recurse -Force
|
||||||
WriteLog 'Removal complete'
|
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'
|
Writelog 'Removing dirty.txt file'
|
||||||
Remove-Item -Path "$FFUDevelopmentPath\dirty.txt" -Force
|
Remove-Item -Path "$FFUDevelopmentPath\dirty.txt" -Force
|
||||||
WriteLog "Cleanup complete"
|
WriteLog "Cleanup complete"
|
||||||
@@ -3600,6 +3608,20 @@ catch {
|
|||||||
Writelog "Cleaning up InstallAppsandSysprep.cmd failed with error $_"
|
Writelog "Cleaning up InstallAppsandSysprep.cmd failed with error $_"
|
||||||
throw $_
|
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
|
#Create Deployment Media
|
||||||
If ($CreateDeploymentMedia) {
|
If ($CreateDeploymentMedia) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user