I would like to emulated with a shortcut the process of 1) opening the Action Center and 2) clicking on the bluetooth icon.
My solution was to use AHK to map a keyboard shortcut to running a .bat, which contains the script suggested in this question.
But the suggested service doesn't activate/remove the magic little blue icon of the bluetooth in the tray bar.enter image description here
I have look for all bluetooth services that are turned on when I click on the bluetooth icon in action center and I have activated them via the suggested
.bat, but still it's not working.
BluetoothUserService_182d916 bthserv BthHFSrv BthHFEnum BthEnum BthHFAud BthEnum BthA2dp Microsoft_Bluetooth_AvrcpTransport
Here are all the services:
My script (where I have replace Microsoft_Bluetooth_AvrcpTransport by all the service mentionned above):
@echo off for /F "tokens=3 delims=: " %%H in ('sc query "Microsoft_Bluetooth_AvrcpTransport" ^| findstr "STATE"') do ( if /I "%%H" NEQ "RUNNING" ( net start "Microsoft_Bluetooth_AvrcpTransport" ) else if /I "%%H" NEQ "STOPPED" ( net stop "Microsoft_Bluetooth_AvrcpTransport" ) ) @pause