Script to disable internal audio device

Has anyone developed a Windows script (batch/command file, Powershell, etc.) to disable the PC’s internal audio device if an external USB audio interface is detected? Some guides I have read recommend disabling internal audio when using an external audio interface to improve performance and lower latency. However, I need the internal audio when working in GP away from my rig, without my audio interface. It would be handy to have this handled automatically by a script.

I haven’t noticed any performance issues leaving my motherboard audio enabled while running my PreSonus ASIO driver (not multi-client). I’ve tried disabling the MB Realtek audio, but that made things worse. So, I just live with both enabled.

FWIW, I only do studio work. Nothing live. So there may be issues that I haven’t experienced.

I have been battling intermittent audio glitches on Windows 10 at a 256 sample buffer with a Mackie Onyx Producer 2.2 audio interface, so I am optimizing my laptop to shut off extraneous devices and services. I did find a Windows tool, DevCon (from the Windows Driver Kit), that can enable or disable devices from the command line. I can then run a script at login to always disable the internal audio device (in my case Realtek HD Audio). I can also create a desktop shortcut to enable Realtek audio if I need to work on GP when disconnected from my Mackie. I will report back on whether this appears to have any effect on performance/stability or not.

Grab a copy of LatencyMon, a free Windows 10 app (real-time audio suitability checker).

Sorry that I didn’t think to mention it earlier.

Did that, and that you themaartian!! Both my laptops are reporting good for audio.