0

I would like to disconnect a device at login using a AutoHotkey.

I want to replicate what happens when clicking on the "Disconnect" button in this screenshot. It's only available for Bluetooth device.

The reason why I want to disconnect the device is because my headphones also work as a headset but I have a dedicated microphone I'd rather use. Disabling the headset device works for most software but Microsoft Teams seems to still have access to the headset device and uses it by default until I disconnect that audio device, while keeping the actual "just headphones" connected.

I have very little experience with AHK interacting with Windows and properties, so I have this script to get to the sound control panel, but then I don't know what to do.

Run, control.exe /name Microsoft.Sound

1 Answers1

0

Check PnPUtil: Enabling/disabling a device in Windows 10 from command line. I don't think there is a need to use AHK in this scenario, a batch script would do just fine.

  • This kind of did it, but I can't mark as answer as it doesn't really answer the main question. I also do not really understand why disabling the device through the Device Manager did something different from using PnPUtil... But it worked none the less! – SamuelCharpentierPP Dec 12 '22 at 22:30