As shown in image , there are devices called "HUAWEI FreeBuds Studio" and "Beats Solo3". These devices were bluetooth headphones I have owned years ago, and I stopped using them for at least a year. I am very confident that either of these devices are located at least 5,000 miles away from my computer.
I have made the following effort to eliminate them:
At this point, I can not find any apparent trace of the existence of these devices on my computer, yet the Cast to Device menu still displays them. To the extent of my imagination, I have no idea what I should do next, other than recklessly decompiling %system32%\playtomenu.dll
.
I am running a 64-bit Windows 10 Pro, Version 22H2 Build 19045. My device is a Surface Laptop Studio i7/32GB/1TB version, and my Bluetooth adapter is built-in.
I would really, really appreciate it if you can give me any advice on how to remove those devices from the menu, without disabling the menu itself.
However, I do not welcome answers that ask me to run antivirus, check Windows update, use Windows troubleshooters, run sfc /scannow
or dism /online /cleanup-image /restorehealth
, or re-install the OS. If you are tempted to reply with one of these low-effort low-value template answers, please kindly don't.
playtomenu.dll
and found this thing Windows.Media.Casting.CastingDevice
.The type initializer for 'System.Windows.Media.FontFamily' threw an exception.
.EEFileLoadException
. I googled it and I was told this is due to a missing dependency, but I can never figure out what it is.playtomenu.dll
was probably seeing,using System;
using System.Threading;
using Windows.Media.Casting;
using Windows.Devices.Enumeration;
using Windows.Foundation;
using System.Collections.Generic;
namespace ConsoleApp1
{
internal class Program
{
static int Main(string[] args)
{
String query = CastingDevice.GetDeviceSelector(CastingPlaybackTypes.Audio);
Console.WriteLine(query);
IAsyncOperation<DeviceInformationCollection> find = DeviceInformation.FindAllAsync(query);
while (find.Status != AsyncStatus.Completed)
{
Thread.Sleep(1000);
}
DeviceInformationCollection list = find.GetResults();
foreach (DeviceInformation dev in list) {
Console.WriteLine(dev.Name);
Console.WriteLine(" " + dev.Id);
Console.WriteLine(" " + dev.Kind);
foreach (KeyValuePair<String, Object> kvp in dev.Properties)
{
Console.WriteLine(" " + kvp.Key);
}
Console.WriteLine("");
}
while (true) Console.ReadKey();
return 0;
}
}
}
which gave me this result:
HUAWEI FreeBuds Studio
{53E4938F-5210-5EC5-903F-71A16498D056}
AssociationEndpointContainer
System.ItemNameDisplay
System.Devices.DeviceInstanceId
System.Devices.Icon
System.Devices.GlyphIcon
System.Devices.InterfaceEnabled
System.Devices.IsDefault
System.Devices.PhysicalDeviceLocation
System.Devices.ContainerId
Beats Solo3
{29C5D8F0-7D73-510D-97F7-B65A0747C499}
AssociationEndpointContainer
System.ItemNameDisplay
System.Devices.DeviceInstanceId
System.Devices.Icon
System.Devices.GlyphIcon
System.Devices.InterfaceEnabled
System.Devices.IsDefault
System.Devices.PhysicalDeviceLocation
System.Devices.ContainerId
Beats Solo3
{4F973908-62D5-5FCE-BFB2-3FA5B2CDF055}
AssociationEndpointContainer
System.ItemNameDisplay
System.Devices.DeviceInstanceId
System.Devices.Icon
System.Devices.GlyphIcon
System.Devices.InterfaceEnabled
System.Devices.IsDefault
System.Devices.PhysicalDeviceLocation
System.Devices.ContainerId
DeviceInstanceId
, PhysicalDeviceLocation
, and ContainerId
were all null
for all these devices.CastingDevice.GetDeviceSelector(CastingPlaybackTypes.Audio)
, which looks like this (formatted):(System.Devices.DevObjectType:=6) AND
(
(System.Devices.AepContainer.ProtocolIds:~~"{E0CBF06C-CD8B-4647-BB8A-263B43F0F974}"
AND System.Devices.AepContainer.SupportsAudio:=System.StructuredQueryType.Boolean#True
AND System.Devices.AepContainer.SupportsRendering:=System.StructuredQueryType.Boolean#True)
OR
((System.Devices.AepContainer.ProtocolIds:~~"{0E261DE4-12F0-46E6-91BA-428607CCEF64}"
AND System.Devices.AepContainer.Categories:~~Multimedia.DMR)
AND System.Devices.AepContainer.SupportsAudio:=System.StructuredQueryType.Boolean#True)
OR
(System.Devices.AepContainer.ProtocolIds:~~"{0407D24E-53DE-4C9A-9BA1-9CED54641188}"
AND System.Devices.AepContainer.IsPresent:=System.StructuredQueryType.Boolean#True)
)
E0CBF06C-CD8B-4647-BB8A-263B43F0F974
in registry editor.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Device Association Framework\InboxProviders\Bluetooth
Device Association Service
in Services. (Yeah, I'm pretty much crazy now)[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Device Association Framework\InboxProviders\Bluetooth]
"AllowReassociation"=dword:00000001
"Capabilities"=dword:0000028d
"CLSID"="{4aa383d6-337a-43d3-a3fa-c14b26004130}"
"DllPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,64,\
00,61,00,66,00,42,00,74,00,68,00,2e,00,64,00,6c,00,6c,00,00,00
"ImpersonateCaller"=dword:00000001
"PropertyRank"=dword:00000032
"ProtocolId"="{e0cbf06c-cd8b-4647-bb8a-263b43f0f974}"
"SecurityContext"=dword:00000000
It turned out that,
Search for binary encoded strings of these names from REG_BINARY records in Registry Editor
is actually the correct answer. I don't know why it didn't work when I tried first.
I used NirSoft's RegScanner because it supports searching for binary values. The device names are stored in an encoded format where for any ASCII character, the value is its ASCII value followed by a null byte. For example, to locate my FreeBuds Studio as shown in the first image, I searched for 46 00 72 00 65 00 65 00 42
.
Byte value: 46 00 72 00 65 00 65 00 42
ASCII char: F r e e B
The search gave me two registry paths:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Device Association Framework\Store\Bluetooth#*
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DeviceAssociationService\State\Store\Bluetooth#*
By examining all such registry keys and deleting them, I was able to get rid of these devices.
I closed all browser tabs I opened for solving this problem and had a cyber orgasm.
May 01, 2024