From 7f3144e48230312eb1ab29e03742e1021e29c8ad Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 15 Jul 2023 11:33:05 +0200 Subject: [PATCH] Add a script for installing asus packages --- scripts/Windows/Scripts/AsusSoftwarePackage.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/Windows/Scripts/AsusSoftwarePackage.ps1 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; +}