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