Guides / Command line and links

Switch audio device from the command line or a link

Run Switchboard.exe output headphones, or open the link switchboard://output/headphones. Anything that can run a program or open a link can now switch your sound: AutoHotkey, Task Scheduler, a desktop shortcut, a Stream Deck "Open" key.

Each command does exactly what the matching hotkey does, and shows the same little notice at the bottom of the screen. If Switchboard isn't running, the command starts it first. Needs version 1.3 or later.

The commands

If a name matches two devices, it tells you both and does nothing, rather than guessing which of your two "Speakers" you meant.

From a terminal or script

The installer puts Switchboard in your user folder, not on the PATH, so use the full path:

& "$env:LOCALAPPDATA\Programs\Switchboard\Switchboard.exe" profile Gaming

The answer prints back ("Profile: Gaming"), and the exit code is 0 when it worked, 1 when it was refused (an unknown device, say) and 2 when Switchboard couldn't be reached. In PowerShell, pipe it (| Out-String) to wait for the answer.

As a link

The same words, separated by slashes. Spaces become %20:

Paste one into a Stream Deck Website or Open action, a desktop shortcut, or Win+R. A browser asks once before opening it, which is the browser being careful, not Switchboard.

An AutoHotkey example

; F13 on a macro key: headset for calls
F13::Run "switchboard://profile/Calls"