Skip to content

Instantly share code, notes, and snippets.

@oasido
Created June 29, 2022 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oasido/519249c0f96d3d95f375f3bc4a9a0dd8 to your computer and use it in GitHub Desktop.
Save oasido/519249c0f96d3d95f375f3bc4a9a0dd8 to your computer and use it in GitHub Desktop.
Batch file to export ALL audio settings to a .reg file
:: Directory to save backups
SET backupDir=D:\Backups\Audio Backup
:: Store date as a variable
FOR /f "tokens=2 delims==" %%G in ('wmic os get localdatetime /value') do set datetime=%%G
SET hh=%time:~0,2%
SET hh=%hh: =0%
SET datetime=%datetime:~0,4%-%datetime:~4,2%-%datetime:~6,2% %hh%-%time:~3,2%-%time:~6,2%
:: Create a backup of the current audio settings state
if not exist "%backupDir%" mkdir "%backupDir%"
reg export HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render "%backupDir%\%datetime% Audio Backup.reg" /y
pause
@oasido
Copy link
Author

oasido commented Jun 29, 2022

You edit all your audio settings first (samples, bit rates) and then you have a quick way to apply all those settings again.

Why bother?
I use Voicemeeter and every time I have a Windows/Nvidia update, I find myself changing all the values back to normal, manually.

Recommendation
After creating a script, store it somewhere safe, and if your settings changes — you have a quick way to return. But!, I'd recommend running the script BEFORE running the generated .reg file, to create a current setting backup, just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment