Skip to content

Instantly share code, notes, and snippets.

@PureOcean
Created September 8, 2020 09:15
Show Gist options
  • Save PureOcean/f259b66347e3b4fbd68b621d8dc52e90 to your computer and use it in GitHub Desktop.
Save PureOcean/f259b66347e3b4fbd68b621d8dc52e90 to your computer and use it in GitHub Desktop.
Activates "Loudness Equalization" setting and Bring out "Enhancements" tab in Control Panel -> Sound -> Playback.
@echo off
%windir%\system32\whoami.exe /USER | find /i "nt authority\system" >nul 2>nul
If ERRORLEVEL 1 (echo Need run this script as TrustedInstaller && pause && GOTO :EOF)
:TrustedInstaller
:: "Property" -> Enhanchments tab
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{d04e05a6-594b-4fb6-a80d-01af5eed7d1d},3" /t REG_SZ /d "{5860E1C5-F95C-4a7a-8EC8-8AEF24F379A1}" /f
:: Toggled "Loudness Equalization" in Enhanchments tab
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{fc52a749-4be9-4510-896e-966ba6525980},3" /t REG_BINARY /d "0B00000001000000FFFF0000" /f
:: Stream FX APO
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{d04e05a6-594b-4fb6-a80d-01af5eed7d1d},5" /t REG_SZ /d "{62dc1a93-ae24-464c-a43e-452f824c4250}" /f
:: Mode FX APO
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{d04e05a6-594b-4fb6-a80d-01af5eed7d1d},6" /t REG_SZ /d "{637c490d-eee3-4c0a-973f-371958802da2}" /f
:: Stream APO FX Processing Mode
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{d3993a3f-99c2-4402-b5ec-a92a0367664b},5" /t REG_MULTI_SZ /d "{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}" /f
:: Mode APO FX Processing Mode
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{d3993a3f-99c2-4402-b5ec-a92a0367664b},6" /t REG_MULTI_SZ /d "{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}" /f
:: Stop & restart audio services
net stop Audiosrv && net stop AudioEndpointBuilder
net start Audiosrv && net start AudioEndpointBuilder
:: Open Playback tab of Control Panel -> Audio
rundll32.exe Shell32.dll,Control_RunDLL Mmsys.cpl,,0
:: Sources:
:: APODriver's the FX Configurator tool
:: https://www.daniweb.com/hardware-and-software/microsoft-windows/threads/505924/loudness-equalization-on-win7-enabling-via-gpo
:: http://www.nezavisim.com/?cat=4&scat=23&id=36&i=1
:: https://sourceforge.net/p/equalizerapo/tickets/77/
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment