mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
- Added new variables for the PPKG, Unattend, Autopilot, and PEDrivers validation
This commit is contained in:
@@ -375,6 +375,11 @@ if (-not $DefenderPath) { $DefenderPath = "$AppsPath\Defender" }
|
|||||||
if (-not $OneDrivePath) { $OneDrivePath = "$AppsPath\OneDrive" }
|
if (-not $OneDrivePath) { $OneDrivePath = "$AppsPath\OneDrive" }
|
||||||
if (-not $EdgePath) { $EdgePath = "$AppsPath\Edge" }
|
if (-not $EdgePath) { $EdgePath = "$AppsPath\Edge" }
|
||||||
if (-not $DriversFolder) { $DriversFolder = "$FFUDevelopmentPath\Drivers" }
|
if (-not $DriversFolder) { $DriversFolder = "$FFUDevelopmentPath\Drivers" }
|
||||||
|
if (-not $PPKGFolder) { $PPKGFolder = "$FFUDevelopmentPath\PPKG" }
|
||||||
|
if (-not $UnattendFolder) { $UnattendFolder = "$FFUDevelopmentPath\Unattend" }
|
||||||
|
if (-not $AutopilotFolder) { $AutopilotFolder = "$FFUDevelopmentPath\Autopilot" }
|
||||||
|
if (-not $PEDriversFolder) { $PEDriversFolder = "$FFUDevelopmentPath\PEDrivers" }
|
||||||
|
|
||||||
|
|
||||||
#FUNCTIONS
|
#FUNCTIONS
|
||||||
function WriteLog($LogText) {
|
function WriteLog($LogText) {
|
||||||
@@ -3609,6 +3614,18 @@ if ($InstallDrivers -or $CopyDrivers) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#Validate PEDrivers folder
|
||||||
|
if ($CopyPEDrivers) {
|
||||||
|
WriteLog 'Doing PEDriver validation'
|
||||||
|
if (!(Test-Path -Path $PEDriversFolder)) {
|
||||||
|
WriteLog "-CopyPEDrivers is set to `$true, but the $PEDriversFolder folder is missing"
|
||||||
|
throw "-CopyPEDrivers is set to `$true, but the $PEDriversFolder folder is missing"
|
||||||
|
}
|
||||||
|
if ((Get-ChildItem -Path $PEDriversFolder -Recurse | Measure-Object -Property Length -Sum).Sum -lt 1MB) {
|
||||||
|
WriteLog "-CopyPEDrivers is set to `$true, but the $PEDriversFolder folder is empty"
|
||||||
|
throw "-CopyPEDrivers is set to `$true, but the $PEDriversFolder folder is empty"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#Validate PPKG folder
|
#Validate PPKG folder
|
||||||
if ($CopyPPKG) {
|
if ($CopyPPKG) {
|
||||||
|
|||||||
Reference in New Issue
Block a user