Last active
February 11, 2025 11:41
-
-
Save NamesMT/9180bfe784c82326aa89603170212b03 to your computer and use it in GitHub Desktop.
Apollo/Sunshine steam streaming audio device enable/disable prep batch
This file contains hidden or 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
@echo off | |
setlocal enabledelayedexpansion | |
REM Allow the script to load relative SoundVolumeView.exe | |
cd /D "%~dp0" | |
REM Check if an action argument is provided | |
if "%~1"=="" ( | |
echo Usage: %0 [enable^|disable] | |
exit /b 1 | |
) | |
REM Set the action based on the argument | |
if /i "%~1"=="enable" ( | |
set "action=/Enable" | |
) else if /i "%~1"=="disable" ( | |
set "action=/Disable" | |
) else ( | |
echo Invalid action: %~1 | |
echo Usage: %0 [enable^|disable] | |
exit /b 1 | |
) | |
set "list[0]=Steam Streaming Speakers\Device\Speakers\Render" | |
set "list[1]=Steam Streaming Microphone\Device\Speakers\Render" | |
set "list[2]=Steam Streaming Microphone\Device\Microphone\Capture" | |
set count=0 | |
:loop | |
if defined list[%count%] ( | |
REM Main logic block | |
echo Executing: SoundVolumeView.exe %action% "!list[%count%]!" | |
SoundVolumeView.exe %action% "!list[%count%]!" | |
echo --- | |
REM Looper | |
set /a count+=1 | |
goto loop | |
) | |
endlocal | |
exit /b 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A bit overkill script but it was fun googling around XD, could've just done multiple lines of SoundVolumeView haha.
Also credit: ClassicOldSong/Apollo#346