|
22 | 22 | .PARAMETER SkipCleanup
|
23 | 23 | [OPTIONAL] Don't cleanup temporary folders or registry keys.
|
24 | 24 | .EXAMPLE
|
25 |
| - .\install_drivers.ps1 -Manufacturer Lenovo -Model 20y0 |
| 25 | + .\install_model_drivers.ps1 -Manufacturer Lenovo -Model 20y0 |
26 | 26 |
|
27 | 27 | Downloads Lenovo driver installer matching the regex 20y0 exact string to
|
28 | 28 | "$env:TEMP\Lenovo" then installs the drivers from the expanded installer.
|
29 | 29 | .EXAMPLE
|
30 |
| - .\install_drivers.ps1 -Manufacturer HP -Model Z440 |
| 30 | + .\install_model_drivers.ps1 -Manufacturer HP -Model Z440 |
31 | 31 |
|
32 | 32 | Downloads HP driver installer matching the regex Z440 exact string to
|
33 | 33 | "$env:TEMP\HP" then installs the drivers from the expanded installer.
|
34 |
| -
|
35 | 34 | .EXAMPLE
|
36 |
| - .\install_drivers.ps1 -Manufacturer Dell -Model 9380 |
| 35 | + .\install_model_drivers.ps1 -Manufacturer Dell -Model 9380 |
37 | 36 |
|
38 | 37 | Downloads Dell driver installer matching the regex 9380 exact string to
|
39 | 38 | "$env:TEMP\Dell" then installs the drivers from the expanded installer.
|
| 39 | +.EXAMPLE |
| 40 | + .\install_model_drivers.ps1 -Manufacturer Microsoft -Model |
| 41 | + 'Surface Laptop 4 with Intel Processor' |
| 42 | +
|
| 43 | + Downloads Microsoft driver installer matching the regex ' |
| 44 | + Surface Laptop 4 with Intel Processor' exact string to "$env:TEMP\Microsoft" |
| 45 | + then installs the drivers via the msi installer. |
40 | 46 | #>
|
41 | 47 |
|
42 | 48 | [CmdletBinding()]
|
@@ -115,7 +121,7 @@ function Get-RegexMatch {
|
115 | 121 | $match_index = 1
|
116 | 122 | }
|
117 | 123 | # Microsoft hides their links behind (at least) two clicks...
|
118 |
| - 'Microsoft' { |
| 124 | + 'MICROSOFT' { |
119 | 125 | $manufacturer_uri = 'https://learn.microsoft.com/en-us/surface/manage-surface-driver-and-firmware-updates'
|
120 | 126 | # Example: <a href="https://www.microsoft.com/download/details.aspx?id=102924" data-linktype="external">Surface Laptop 4 with Intel Processor</a>
|
121 | 127 | $file_regex = "(\d{6})(?:`" data-linktype=`"external`">$Model)"
|
@@ -177,7 +183,7 @@ function Invoke-Installer {
|
177 | 183 | 'HP' {
|
178 | 184 | $arg_list = @('-s', '-f', $Destination)
|
179 | 185 | }
|
180 |
| - 'Microsoft' { |
| 186 | + 'MICROSOFT' { |
181 | 187 | $arg_list = @('/qn', '/norestart')
|
182 | 188 | }
|
183 | 189 | default { throw "Manufacturer [$Manufacturer] is not (yet) supported..." }
|
|
0 commit comments