mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 10:19:36 -06:00
Removes Surface-specific validation for Microsoft devices
Allows driver mapping to support all Microsoft-branded devices, not just Surface products. Previously, the code rejected any Microsoft device that didn't match "Surface" in the model name. This restriction prevented proper driver mapping for other Microsoft hardware. Updates log messages to use generic "Microsoft model" terminology instead of "Surface" to reflect the broader device support.
This commit is contained in:
@@ -567,18 +567,14 @@ function Find-DriverMappingRule {
|
|||||||
return $null
|
return $null
|
||||||
}
|
}
|
||||||
'Microsoft' {
|
'Microsoft' {
|
||||||
if (-not [regex]::IsMatch($SystemInformation.Model, 'Surface', 'IgnoreCase')) {
|
|
||||||
WriteLog "DriverMapping: Manufacturer Microsoft detected but model '$($SystemInformation.Model)' is not a Surface device."
|
|
||||||
return $null
|
|
||||||
}
|
|
||||||
foreach ($rule in $rulesForMake) {
|
foreach ($rule in $rulesForMake) {
|
||||||
$ruleModelNorm = ConvertTo-ComparableModelName -Text $rule.Model
|
$ruleModelNorm = ConvertTo-ComparableModelName -Text $rule.Model
|
||||||
if (-not [string]::IsNullOrWhiteSpace($ruleModelNorm) -and $ruleModelNorm -eq $normalizedModel) {
|
if (-not [string]::IsNullOrWhiteSpace($ruleModelNorm) -and $ruleModelNorm -eq $normalizedModel) {
|
||||||
WriteLog "DriverMapping: Surface model '$normalizedModel' matched '$($rule.Model)'."
|
WriteLog "DriverMapping: Microsoft model '$normalizedModel' matched '$($rule.Model)'."
|
||||||
return $rule
|
return $rule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WriteLog 'DriverMapping: No Surface model match found in mapping.'
|
WriteLog 'DriverMapping: Microsoft model not present in mapping.'
|
||||||
return $null
|
return $null
|
||||||
}
|
}
|
||||||
'Panasonic Corporation' {
|
'Panasonic Corporation' {
|
||||||
|
|||||||
Reference in New Issue
Block a user