2

I have spent the past two hours trying to turn off Bluetooth by a hotkey or through CMD.

This link shares two commands you can use to toggle Bluetooth:

net stop bthserv
net start bthserv

You get feedback saying it was successful but speaker still plays, mouse still works, etc etc.

Surely there is a way with AHK?

somebadhat
  • 1,240

1 Answers1

1

Try this AHK script:

FileDelete, %A_Temp%\ServiceCheck.csv
RunWait, %comspec% /c "sc query bthserv" > %A_Temp%\ServiceCheck.csv
FileRead, Content, %A_Temp%\ServiceCheck.csv
    If InStr(Content, "STOPPED")
        Run, %comspec% /c "sc start bthserv"
    else
        Run, %comspec% /c "sc stop bthserv"
FileDelete, %A_Temp%\ServiceCheck.csv
Relax
  • 3,785