I was in need of a script that could change my output device between my speakers and my headphone because I do need to change between them quite often and going trough the GUI was starting to become annoying.
I ended up making two batch files
nircmd.exe setdefaultsounddevice "Speakers"
nircmd.exe setdefaultsounddevice "EarForce X11"
I added nircmd.exe to my path. The two commands work when I execute them from a command line and it also works when I execute the ".bat" files from my file explorer but when I map the execution to a keyboard macro via my Razer Synapse software, it doesn't work. I see the CMD pop up for a second and close, like expected, but it doesn't change the settings.
My only hypothesis is that executing those scripts require administrative previleges and consequently, they can't be launched by a software. Even if this is the problem, I have no idea how to solve it.
Any help would be appreciated!
- Windows 8.1
- I use Razer Synapse to control my Razer BlackWidow Chroma keyboard