Add a script for installing asus packages
This commit is contained in:
parent
629978a897
commit
7f3144e482
1 changed files with 15 additions and 0 deletions
15
scripts/Windows/Scripts/AsusSoftwarePackage.ps1
Normal file
15
scripts/Windows/Scripts/AsusSoftwarePackage.ps1
Normal file
|
@ -0,0 +1,15 @@
|
|||
. "$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;
|
||||
}
|
Loading…
Reference in a new issue