Set default audio device of specific application from command line on Windows 10

Starting from April 2018 Update of Windows 10 (Version 1803), you are allowed to set the default audio device for every application separately.
You can do it by clicking the ‘App volume and device preferences’ button inside the ‘Sound settings’ window.
App volume and device preferences button
Inside the ‘App volume and device preferences’ window, you can choose the default input device and output device for every sound application currently running on your system:

App volume and device preferences

The new version of SoundVolumeView (2.10) allows you to do the same thing from command line, without displaying any user interface.

The command that sets the default audio device of specific application is /SetAppDefault .
This command accepts 3 parameters: The device name, the device role (0 – Console, 1 – Multimedia, 2 – Communications), name or ID of the process.

For example, the following command sets the default output device of Firefox to “High Definition Audio Device\Device\Speakers\Render” :

SoundVolumeView.exe /SetAppDefault “High Definition Audio Device\Device\Speakers\Render” 0 “Firefox.exe”

The following command sets the default input device of process that its ID is 6380 to the desired Microphone device:

SoundVolumeView.exe /SetAppDefault “Realtek High Definition Audio\Device\Microphone\Capture” 0 6380

You can download the new version of SoundVolumeView from this Web page.

4 Comments

  1. John Martin says:

    Hello.

    This looks really great. Would it be possible to read the app default (/GetAppDefault) to be able to switch an app across different outputs? For example to switch an app between speakers and headsets. Even better to have this built-in (just like the switch for mute/unmute does).

    Thank you,

    P.S. What’s the difference between Console, Multimedia and Communications?

  2. Thib Colliers says:

    Hello
    This doesn’t seem to work for MS Teams.
    Win10 Pro, version 2004, os build 19041.572
    MS Teams desktop app, 1.3.00.24755
    Does it work on your config ?
    Thanks

  3. Dave says:

    love the idea of being able to just simply mute and unmute the line in every hour for 2 mins but alas it seems that win 10 task scheduler doesn’t support this prog which is a real shame . Any ideas would be really appreciated , cheers. thanks .

  4. C says:

    I just wasted a whole lot of time because somehow copying your command example here didn’t paste standard quotations but something else, that took ages to notice in a batch file, that wouldn’t work regardless of permutations. I didn’t realise for ages that the quotations I’d copied, I believe from here, were somehow interpreted as “ÔÇØ” in command prompt.

Leave a Reply