You can use btconfig. The link to their main page can be found here: btconfig and the direct download can be found here: download. Examples of how you can use it can be found here: Command Examples. btconfig is a tool that will allow you to disconnect a bluetooth device via commandline without unpairing it. Since you can use it via batch or CMD scripts and have those run without the windows popping up, and since the names for your devices are unlikely to change, you can have devices that you don't want pairing automatically to disconnect right away.
Firstly, after installing btconfig, you would run the following in Command Prompt:
btdiscovery -s
This would list your bluetooth devices. Find the address for the devices you don't want to auto connect. They should look something like XX:XX:XX:XX:XX:XX.
Using btcom -b XX:XX:XX:XX:XX:XX should disconnect the intended device from bluetooth. So, make a batch file that runs the command for each of the devices that you don't want to auto connect. It should look something like this:
@ECHO OFF
btcom -b XX:XX:XX:XX:XX:XX
btcom -b XX:XX:XX:XX:XX:XX
btcom -b XX:XX:XX:XX:XX:XX
Save it as a batch file and create a shortcut for it. Right-click the shortcut and click "Properties". For the "Run:" field under the "Shortcut" tab, click the dropdown and select minimized. Next, click "Advanced..." and make sure the "Run ad administrator" box is ticked. Click "Apply" and close the properties window. This will be capable of disconnecting only specified devices, as it would only disconnect the Bluetooth devices with the addresses you have specified in the batch script.
Next, you'll have to open Event Viewer. Expand "Applications and Services Logs", then expand "Microsoft", then expand "Windows", then expand "Bluetooth-Policy". Right-click "Operational" and click "Enable Log". You can close Event Viewer now. After that, you'll have to create a task in Task Scheduler. Here's how you'd do that:
- Search for and open Task Scheduler
- On the right-side pane, click "Create Task..."
- Name the task to whatever you'd like, set it to run whether a user is logged on or not, and set it to run with highest privileges.
- Under the "Triggers" tab, click "New...". Click the dropdown for "Begin the task:" and choose "On an event".
- Under "Log:", click the dropdown and choose "Microsoft-Windows-Bluetooth-Policy/Operational".
- Under "Source:", click the dropdown and choose "Bluetooth-Policy".
- Under "Event ID:", type in "9" (but remove the quotes). Click "OK".
- Under the "Actions" tab, click "New...". Make sure "Start a program" is selected for the "Action:" field.
- Under "Program/script:" click "Browse...". Navigate to the shortcut you made for the batch file and select it.
- Make sure to check the "Conditions" tab and untick "Start the task only if the computer is on AC power" under the "Power" section. Click "OK".
Lastly, you'll have to create a way to easily disable the task (if you'd like to). You can do this by making another batch script. Write this into the batch script:
schtasks /Change /TN "<Task Folder Path>\<Task Name>" /Disable
If you created the task under "Task Scheduler (Local)" -> "Task Scheduler Library" and named it "auto-connect-disconnect", then it would look like this:
schtasks /Change /TN "auto-connect-disconnect" /Disable
Save the batch script and create a shortcut for it. Right-click it and click "Properties" again. For the "Run:" field under the "Shortcut" tab, click the dropdown and choose "Minimized" again. Click "Advanced..." and make sure "Run as administrator" is enabled again. Click the "Shortcut key:" field where it says "None" and choose a shortcut key combo. An example would be Ctrl + Num 1 for the Control key and 1 on your number pad. If you want to change it, click the field again and choose a new shortcut key combo.
This will automatically and silently run a batch script that will disable the task you created to automatically disconnect unwanted devices. Duplicate the batch file, rename it, choose a different shortcut key, right-click the duplicated batch file, and replace /Disable with /Enable to make it so you can enable the task again via shortcut key combo.