15 lines
577 B
PowerShell
15 lines
577 B
PowerShell
. "$PSScriptRoot/Context.ps1";
|
|
|
|
function Install-AsusSoftwarePackage([Context] $context, [string] $url) {
|
|
$packageFile = "AsusPackage.zip";
|
|
$tempDir = $context.GetTempDirectory();
|
|
$null = Push-Location $tempDir;
|
|
$unpackedDir = $context.GetTempDirectory();
|
|
Invoke-WebRequest $url -OutFile $packageFile;
|
|
Expand-Archive $packageFile $unpackedDir;
|
|
$null = Pop-Location;
|
|
Remove-Item -Recurse $tempDir;
|
|
|
|
$null = Start-Process -Wait -FilePath "$(Join-Path $unpackedDir "AsusSetup.exe")" -ArgumentList "/S";
|
|
Remove-Item -Recurse $unpackedDir;
|
|
}
|