PortValhalla/scripts/Windows/Drivers/Predator Z301C/Install.ps1

18 lines
552 B
PowerShell

#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context]$context = $context;
$tempDir = $context.GetTempDirectory();
$fileName = "driver.zip";
Push-Location $tempDir;
Invoke-WebRequest "https://global-download.acer.com/GDFiles/Driver/Monitor/Monitor_Acer_1.0_W7x86W7x64W8x86W8x64_A.zip?acerid=636092441703392074" -OutFile $fileName;
Expand-Archive $fileName;
Start-Process -Wait -FilePath "pnputil" -ArgumentList ([string[]]@("/add-driver", "*.inf", "/install", "/subdirs"));
Pop-Location;
Remove-Item -Recurse $tempDir;