Bluetooth toggle shortcut

Page 2 of 2 FirstFirst 12

  1. Posts : 7
    Windows 10
    Thread Starter
       #11

    the mouse doesn't have a dedicated adapter I use this one: USB-BT400 | Networking | ASUS USA
      My Computer


  2. Posts : 68,948
    64-bit Windows 11 Pro for Workstations
       #12

    Why are you needing to disable the mouse for? Is there some issue?

    Maybe we can work around it using another method.
      My Computers


  3. Posts : 7
    Windows 10
    Thread Starter
       #13

    Brink said:
    Why are you needing to disable the mouse for? Is there some issue?

    Maybe we can work around it using another method.
    ok the full story here is that i use 2 screens and 2 sets of keyboards and mice which are relatively far apart form one another.
    so i usually keep the 2nd set disabled so that no one gets the idea to use that set and move my pointer form somewhere else when I am on the PC (just turning that set off isn't going to solve it as i got jokers around) ... but if I forget to turn the bluetooth on and move to the second screen it's a pain to move back just for that ... and the plan is to use unified remote on my phone to turn the bluetooth on remotely without going back ... with unified remote I can launch any bat file for example if that would work
    i know it's pretty much a stupid lazy reason but i find it strange that there is no simple solution to this
      My Computer


  4. Posts : 68,948
    64-bit Windows 11 Pro for Workstations
       #14

    I'm not sure there is a simple solution for this other than manually turning Bluetooth on and off as needed.

    Hopefully, someone else may have some ideas.
      My Computers


  5. Posts : 194
    Windows 10
       #15

    Doesnt work on Windows10 @Brink Can you please update the script? I am looking for a bat script to toggle BT on off but cant find anything working so far. Your script doesnt work, because Windows10 wants a y/n input because stopping the service also will stop other services.

    I actually need something like this, because stupid Windows 10 let Bluetooth run in modern standby, causing the laptop to wake up with BT devices connected (like a mouse). I cant see how an important feature like this is missing and this is totally the reason why Windows 10 is horrible. It lacks countless elemental little features like this. Before modern standby, you could allow/disallow devices to wake up the pc from S3, this doesnt seem to be disallowed by BS for modern standby, for whatever reason. My only hope was, to implement some service which processes a toggle bat file, when the PC enters sleep and wakes up.
      My Computer


  6. Posts : 68,948
    64-bit Windows 11 Pro for Workstations
       #16

    Hello @gorgor,

    The Bluetooth script still works for me, but since you do have to use "Run as administrator" on the .bat file, you do get a UAC prompt.

    If it helps, here are the specific commands:

    (Enable and start Bluetooth service)
    sc config "bthserv" start=Auto & net start "bthserv"

    (Stop and disable Bluetooth service)
    net stop "bthserv" & sc config "bthserv" start=disabled
      My Computers


  7. Posts : 194
    Windows 10
       #17

    .................... no.... it is NOT, for the reason I said. Windows wants to deactivate more than one service and wants a y/n prompt:

    Bluetooth toggle shortcut-mqpycuc.png
      My Computer


  8. Posts : 68,948
    64-bit Windows 11 Pro for Workstations
       #18

    @gorgor

    You have two dependent services below that you can add commands for them like below.

    I don't know what the Service name for the "Bluetooth Support Service for user 63331" is on your computer, so I need you to see what it is, and post back with so I can add it to the command below.

    Start, Stop, and Disable Services in Windows 10 | Windows 10 Tutorials

    • Bluetooth Support Service for user 63331
    • Bluetooth Audio Gateway Service


    Code:
    @echo off
    
    for /F "tokens=3 delims=: " %%H in ('sc query "bthserv" ^| findstr "STATE"') do (
      if /I "%%H" NEQ "RUNNING" (
       sc config "BTAGService" start=Auto & net start "BTAGService"
       sc config "bthserv" start=Auto & net start "bthserv"
      ) else if /I "%%H" NEQ "STOPPED" (
       net stop "BTAGService" & sc config "BTAGService" start=disabled
       net stop "bthserv" & sc config "bthserv" start=disabled
      )
    )

    Bluetooth toggle shortcut-service_name.png
    Last edited by Brink; 02 Oct 2018 at 10:11.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:45.
Find Us




Windows 10 Forums