Thank you so much. Please allow me to condense the information a bit:
Use rundll to display the sound settings dialog. The last argument specifies the tab to open.
Example:
Playback Tab (0) Code:
%windir%\System32\rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,0
Example:
Recording Tab (1) Code:
%windir%\System32\rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,1
For those wondering why i care:
I'm using SoundWire to connect my Headphones to the PC, so i don't need to crawl under the desk to plug them in. But turning off the loudspeakers is at least 10 klicks in Windows 7.
I cooked up a AutoIt script to do it for me, but I could not figure out how to open this Dialog without using the mouse. Thanks you for providing these shortcuts.