fix(installer): update vigembus (#1670)
This commit is contained in:
@@ -15,7 +15,7 @@ for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVer
|
||||
if !ProxyEnable! equ 0x1 (
|
||||
for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^| find /i "ProxyServer"') do (
|
||||
set proxy=%%a
|
||||
echo Using system proxy !proxy! to download ViGEmBus
|
||||
echo Using system proxy !proxy! to download Virtual Gamepad
|
||||
set proxy=-x !proxy!
|
||||
)
|
||||
) else (
|
||||
@@ -23,8 +23,8 @@ for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVer
|
||||
)
|
||||
)
|
||||
|
||||
rem get browser_download_url from asset 0 of https://api.github.com/repos/vigem/vigembus/releases/latest
|
||||
set latest_release_url=https://api.github.com/repos/vigem/vigembus/releases/latest
|
||||
rem get browser_download_url from asset 0 of https://api.github.com/repos/nefarius/vigembus/releases/latest
|
||||
set latest_release_url=https://api.github.com/repos/nefarius/vigembus/releases/latest
|
||||
|
||||
rem Use curl to get the api response, and find the browser_download_url
|
||||
for /F "tokens=* USEBACKQ" %%F in (`curl -s !proxy! -L %latest_release_url% ^| findstr browser_download_url`) do (
|
||||
@@ -40,10 +40,10 @@ set browser_download_url=%browser_download_url:browser_download_url: =%
|
||||
echo %browser_download_url%
|
||||
|
||||
rem Download the exe
|
||||
curl -s -L !proxy! -o "%temp_dir%\vigembus.exe" %browser_download_url%
|
||||
curl -s -L !proxy! -o "%temp_dir%\virtual_gamepad.exe" %browser_download_url%
|
||||
|
||||
rem Install vigembus
|
||||
%temp_dir%\vigembus.exe /passive /promptrestart
|
||||
rem Install Virtual Gamepad
|
||||
%temp_dir%\virtual_gamepad.exe /passive /promptrestart
|
||||
|
||||
rem Delete temp directory
|
||||
rmdir /S /Q "%temp_dir%"
|
||||
@@ -1,4 +1,4 @@
|
||||
@echo off
|
||||
|
||||
rem Use wmic to get the uninstall ViGEmBus
|
||||
rem Use wmic to get the uninstall Virtual Gamepad
|
||||
wmic product where name="ViGEm Bus Driver" call uninstall
|
||||
Reference in New Issue
Block a user