You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comparison of the installed Windows version to a driver Windows version dependency does not work as intended. Consequently, when a driver has a dependency on Windows 11, LSUClient will still install it on a Windows 10 machine. This can lead to blue screens!
In Test-MachineSatisfiesDependencies.ps1, this part of the code does not behave as you would expect:
'_OS' {
foreach ($entry in $Dependency.OS) {
if ("$entry" -like "${CachedHardwareTable['_OS']}*") {
return 0
}
}
If you change the code as follows, it works:
'_OS' {
foreach ($entry in $Dependency.OS) {
if ("$entry" -like ("{0}*" -f $CachedHardwareTable['_OS'])) {
return 0
}
}
I think the asterisk * character behaves different when placed after the hashtable lookup. So I propose to change the line as shown above ort to something similar.
Thanks again, this will be fixed in the next version (1.4.0) which I'm hoping to release very shortly anyway - if I don't find any more problems during testing!
Version
1.3.4
Computer Model
20U6S3XQ00
Problem
The comparison of the installed Windows version to a driver Windows version dependency does not work as intended. Consequently, when a driver has a dependency on Windows 11, LSUClient will still install it on a Windows 10 machine. This can lead to blue screens!
In Test-MachineSatisfiesDependencies.ps1, this part of the code does not behave as you would expect:
If you change the code as follows, it works:
You can easily try this yourself:
I think the asterisk * character behaves different when placed after the hashtable lookup. So I propose to change the line as shown above ort to something similar.
Great work, btw.!
Edit: This seems to be the problem:
So you can change the line to:
if ("$entry" -like "$($CachedHardwareTable['_OS'])*") {
Additional context
No response
The text was updated successfully, but these errors were encountered: