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:
rbalsleyMSFT
2025-11-17 17:53:51 -08:00
parent d6688def9d
commit 93c4679c46
@@ -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' {