-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke-LenovoBIOSUpdate does not work with new ThinkPad models #359
Comments
Always filter left whenever you can and don't use -Like if you don't intend to use wildcard. Simplified version:
|
There is an update, the first solution only works when Windows is installed. if ($TSEnvironment.Value("SMSTSinWinPE") -eq $true) { if (([Environment]::Is64BitOperatingSystem) -eq $true -and !($WinUPTPUtility)) { if (!($WinUPTPUtility)) { |
Thank you, but it didn't work in PE. Two underscore's were were missing(typo I guess...). The code below works(tested).
|
I have found out that the powershell script for Lenovo BIOS update, Invoke-LenovoBIOSUpdate.ps1, does work on some new ThinkPad models. That is the models:
ThinkPad T14 Gen 3 & 4
ThinkPad P14s Gen 3 & 4
ThinkPad T16 Gen 1 & 2
ThinkPad P16s Gen 1 & 2
Because the WinUPTP64.exe (used for 64-bit OS) doesn't exists in the BIOS update package. There is only WinUPTP.exe version.
This update that first check for WinUPTP64.exe and then WinUPTP.exe will solve the problem.
Line 127:
# WinUPTP bios upgrade utility file name
if (([Environment]::Is64BitOperatingSystem) -eq $true) {
$WinUPTPUtility = Get-ChildItem -Path $Path -Filter ".exe" -Recurse | Where-Object { $_.Name -like "WinUPTP64.exe" } | Select-Object -ExpandProperty FullName
if (!($WinUPTPUtility)) {
$WinUPTPUtility = Get-ChildItem -Path $Path -Filter ".exe" -Recurse | Where-Object { $.Name -like "WinUPTP.exe" } | Select-Object -ExpandProperty FullName
}
}
else {
$WinUPTPUtility = Get-ChildItem -Path $Path -Filter "*.exe" -Recurse | Where-Object { $.Name -like "WinUPTP.exe" } | Select-Object -ExpandProperty FullName
}
The text was updated successfully, but these errors were encountered: