diff --git a/scripts/Windows/Scripts/AsusSoftwarePackage.ps1 b/scripts/Windows/Scripts/AsusSoftwarePackage.ps1 new file mode 100644 index 00000000..7f6565d4 --- /dev/null +++ b/scripts/Windows/Scripts/AsusSoftwarePackage.ps1 @@ -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; +}