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,172
  • 2
  • 9
  • 24
ahk_user99
  • 105
  • 1
  • 7
  • 1
    Does this answer your question? [Turn on/off Bluetooth radio/adapter from cmd/powershell in Windows 10](https://superuser.com/questions/1168551/turn-on-off-bluetooth-radio-adapter-from-cmd-powershell-in-windows-10) – Trenly May 13 '20 at 03:42
  • No need to get huffy. You haven't figured something out, calling "incompetence" isn't necessary or helpful. – music2myear May 14 '20 at 02:50

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
user3419297
  • 3,370
  • 2
  • 11
  • 11