Skip to content

Commit

Permalink
Fixed install script
Browse files Browse the repository at this point in the history
  • Loading branch information
lelegard committed Apr 21, 2023
1 parent 72070d7 commit 69bd13f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
[CmdletBinding(SupportsShouldProcess=$true)]
param([switch]$NoPause = $false)

# Find architecture directory.
$OSArch = (Get-WmiObject Win32_OperatingSystem).OSArchitecture
$Arch = if ($OSArch -like "*arm*") {"arm64"} elseif ($OSArch -like "*64*") {"x64"} else {"x86"}
$EndOpt = if ($NoPause) {"-np"} else {"-p"}

if (Test-Path "$PSScriptRoot\$Arch\Release\kbdadmin.exe") {
& "$PSScriptRoot\$Arch\Release\kbdadmin.exe" -i "$PSScriptRoot\$Arch\Release"
& "$PSScriptRoot\$Arch\Release\kbdadmin.exe" -i "$PSScriptRoot\$Arch\Release" $EndOpt
}
elseif (Test-Path "$PSScriptRoot\$Arch\setup.exe") {
& "$PSScriptRoot\$Arch\setup.exe"
& "$PSScriptRoot\$Arch\setup.exe" $EndOpt
}
else {
Write-Output "No installation program found"
}

if (-not $NoPause) {
pause
if (-not $NoPause) {pause}
}

0 comments on commit 69bd13f

Please sign in to comment.