fix(windows): bundle vigembus instead of downloading it (#4088)

This commit is contained in:
ReenigneArcher
2025-07-16 18:34:06 -04:00
committed by GitHub
parent 1725da216b
commit 1d4f5c3798
6 changed files with 47 additions and 70 deletions

View File

@@ -0,0 +1,20 @@
# Check if a compatible version of ViGEmBus is already installed (1.17 or later)
try {
$vigemBusPath = "$env:SystemRoot\System32\drivers\ViGEmBus.sys"
$fileVersion = (Get-Item $vigemBusPath).VersionInfo.FileVersion
if ($fileVersion -ge [System.Version]"1.17") {
Write-Information "The installed version is 1.17 or later, no update needed. Exiting."
exit 0
}
}
catch {
Write-Information "ViGEmBus driver not found or inaccessible, proceeding with installation."
}
# Install Virtual Gamepad
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
$installerPath = Join-Path $scriptPath "vigembus_installer.exe"
Start-Process `
-FilePath $installerPath `
-ArgumentList "/passive", "/promptrestart"