Extract drivers from Lenovo driver packages
1 2 3 4 |
Get-ChildItem -Path E:\T450S -Filter *.exe -Exclude getw10ver.exe -Depth 1 | ForEach { write-host $_.Fullname Start-Process $_.Fullname -ArgumentList '/VERYSILENT /Extract="YES" /DIR="c:\tempdriver"' -Wait } |
If you are running an older version of PowerShell you can use this alternative script:
1 2 3 4 |
Get-ChildItem -Path 'E:\ThinkPad T480s' -Filter *.exe -Exclude getw10ver.exe,getw10ver4 -Recurse | ForEach { write-host $_.Fullname Start-Process $_.Fullname -ArgumentList '/VERYSILENT /Extract="YES" /DIR="E:\ThinkPad T480s"' -Wait } |