-
-
Notifications
You must be signed in to change notification settings - Fork 954
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installer: auto install vigembus (#1100)
- Loading branch information
1 parent
f169c6d
commit 972f726
Showing
4 changed files
with
54 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@echo off | ||
|
||
rem Get temp directory | ||
set temp_dir=%temp%/Sunshine | ||
|
||
rem Create temp directory if it doesn't exist | ||
if not exist "%temp_dir%" mkdir "%temp_dir%" | ||
|
||
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 Use curl to get the api response, and find the browser_download_url | ||
for /F "tokens=* USEBACKQ" %%F in (`curl -s -L %latest_release_url% ^| findstr browser_download_url`) do ( | ||
set browser_download_url=%%F | ||
) | ||
|
||
rem Strip quotes | ||
set browser_download_url=%browser_download_url:"=% | ||
|
||
rem Remove the browser_download_url key | ||
set browser_download_url=%browser_download_url:browser_download_url: =% | ||
|
||
echo %browser_download_url% | ||
|
||
rem Download the exe | ||
curl -s -L -o "%temp_dir%\vigembus.exe" %browser_download_url% | ||
|
||
rem Install vigembus | ||
%temp_dir%\vigembus.exe /passive /promptrestart | ||
|
||
rem Delete temp directory | ||
rmdir /S /Q "%temp_dir%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
|
||
rem Use wmic to get the uninstall ViGEmBus | ||
wmic product where name="ViGEm Bus Driver" call uninstall |