
Я не могу удалить ни одно устройство Bluetooth с моего компьютера.
Я перепробовал столько способов. Удалял из диспетчера устройств, панели управления, настроек, блютуза. Ни один не работает.
Почему это проблема?
Допустим, я меняю адаптер Bluetooth. Я не могу добавить устройство, потому что оно все еще там. Я не могу подключиться, потому что оно не сопряжено правильно с новым адаптером.
Я попробовал отобразить скрытые устройства, удалить их. Снова появляется в диспетчере устройств.
Есть решения, которые некоторые программы делают некоторое время назад. Программы больше не существует.
Это ошибка, которая встречается во многих ОС Windows 10.
Что я должен делать?
Я просто хочу, чтобы мой компьютер «забыл» все устройства Bluetooth и запустил новую версию.
Где хранятся все эти Bluetooth-устройства? Я могу удалить их все.
Кто-то сказал мне вставить что-то в powershell. Что-то вроде ответа Кейта Миллера.
This is the result. not only device I really want to remove is not listed, I cannot remove any devices at all
Select a device to remove (0 to Exit): 17
Removing device: Mi Phone mimax 3
Sorry, an error occured.
******** Bluetooth Devices ********
1 - Generic Attribute Profile
2 - Bluetooth LE Generic Attribute Service
3 - Galaxy A70
4 - Device Information Service
5 - 小米蓝牙手柄
6 - Bluetooth LE Generic Attribute Service
7 - Generic Attribute Profile
8 - Bluetooth LE Generic Attribute Service
9 - Generic Access Profile
10 - Lenovo A6000
11 - Bluetooth LE Generic Attribute Service
12 - MX Master
13 - Generic Attribute Profile
14 - Device Information Service
15 - Device Information Service
16 - BT-163
17 - SMI-M1
18 - Bluetooth LE Generic Attribute Service
19 - Bluetooth LE Generic Attribute Service
20 - Avantree Saturn Pro
21 - Generic Access Profile
22 - Bluetooth LE Generic Attribute Service
23 - MX Master
24 - Generic Access Profile
25 - Bluetooth LE Generic Attribute Service
Select a device to remove (0 to Exit): 24
Removing device: Generic Access Profile
Sorry, an error occured.
Я ищу решение более низкого уровня. Такие вещи, как удаление какой-то записи реестра или какого-то каталога. Где хранится вся информация об этих устройствах? Я хочу просто удалить их
решение1
Создайте точку восстановления на всякий случай.Диспетчер устройств, попробуйте переключить вид на Devices by connection
и удалить USB Host Controller
:
Дайте всему произойти, а затем перезапустите и посмотрите, как идут дела.
Скопируйте и вставьте следующее вPowerShellОкно консоли. Нажмите <Enter>
для выполнения:
$Source = @"
[DllImport("BluetoothAPIs.dll", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.U4)]
static extern UInt32 BluetoothRemoveDevice(IntPtr pAddress);
public static UInt32 Unpair(UInt64 BTAddress) {
GCHandle pinnedAddr = GCHandle.Alloc(BTAddress, GCHandleType.Pinned);
IntPtr pAddress = pinnedAddr.AddrOfPinnedObject();
UInt32 result = BluetoothRemoveDevice(pAddress);
pinnedAddr.Free();
return result;
}
"@
Function Get-BTDevice {
Get-PnpDevice -class Bluetooth |
?{$_.HardwareID -match 'DEV_'} |
select Status, Class, FriendlyName, HardwareID,
# Extract device address from HardwareID
@{N='Address';E={[uInt64]('0x{0}' -f $_.HardwareID[0].Substring(12))}}
}
################## Execution Begins Here ################
$BTR = Add-Type -MemberDefinition $Source -Name "BTRemover" -Namespace "BStuff" -PassThru
$BTDevices = @(Get-BTDevice) # Force array if null or single item
Do {
If ($BTDevices.Count) {
"`n******** Bluetooth Devices ********`n" | Write-Host
For ($i=0; $i -lt $BTDevices.Count; $i++) {
('{0,5} - {1}' -f ($i+1), $BTDevices[$i].FriendlyName) | Write-Host
}
$selected = Read-Host "`nSelect a device to remove (0 to Exit)"
If ([int]$selected -in 1..$BTDevices.Count) {
'Removing device: {0}' -f $BTDevices[$Selected-1].FriendlyName | Write-Host
$Result = $BTR::Unpair($BTDevices[$Selected-1].Address)
If (!$Result) {"Device removed successfully." | Write-Host}
Else {"Sorry, an error occured." | Write-Host}
}
}
Else {
"`n********* No devices found ********" | Write-Host
}
} While (($BTDevices = @(Get-BTDevice)) -and [int]$selected)