Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::Edit audio configuration using CMD W/H GUI! ::
- ::Created by RU$$ [http://russdev.mooo.com/] ::
- ::FIXED on 5/8/2018 - Fixed issue with reg perms ::
- ::CREDIT - https://goo.gl/qPqApY ::
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- @echo off
- title Edit audio configuration using CMD
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Main Menu
- :MENU
- cls
- ::List
- echo CURRENT ADRESS LIST:
- echo =======================================================
- powershell.exe -nologo -noprofile -command "Get-ChildItem -Path hklm:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render"
- echo =======================================================
- echo KEY VALUE MAP:
- echo 1 - Active
- echo 2 - Disabled
- echo 4 - Not present
- echo 8 - Unplugged
- echo.
- SET INPUT=
- SET /P INPUT= Select an entry to modifiy:
- GOTO :REG
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: SUB EXPLORER
- :REG
- cls
- ::List
- echo KEY NAME:
- echo =======================================================
- FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%INPUT%\Properties" /v "{b3f8fa53-0004-438e-9003-51a46e139bfc},6"') DO set "DFMT=%%B"
- ECHO %DFMT%
- echo =======================================================
- echo.
- echo KEY VALUE 0x(VALUE):
- echo =======================================================
- FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%INPUT%" /v "DeviceState"') DO set "DFMT=%%B"
- ECHO %DFMT%
- echo =======================================================
- echo.
- echo Options:
- echo [1] Go back to audio list
- echo.
- ::Menu
- SET INPUT2=
- SET /P INPUT2= Change this device status to:
- IF /I '%INPUT2%'=='' GOTO :REG
- IF /I '%INPUT2%'=='1' GOTO :MENU
- GOTO :SET
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: KEY PERMS & MODS
- :SET
- cls
- Echo Changing keys value..
- Echo.
- ::Grant perms to REG
- echo \Registry\machine\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%INPUT% [7] >> "%~dp0KeyPermx.txt"
- REGINI %~dp0KeyPermx.txt
- del %~dp0KeyPermx.txt
- ::Change Key
- reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%INPUT%" /f /v DeviceState /t REG_DWORD /d %INPUT2%
- Echo.
- pause.
- GOTO :REG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement