How to uncheck the click"allow bluetooth devices to find this pc" by windows api?

frank zhang 121 Reputation points
2023-03-26T02:15:03.0266667+00:00

Hello, I want to use bluetooth to scan other devices, but don't want other devices can see windows pc. I found that if "allow bluetooth devices to find this pc" is checked, other devices can also find windows pc at any time. So how to make the "allow bluetooth devices to find this pc" unchecked or just let windows do not broadcast self with windows api or shell scripts ? (do manual work to set it in system settings is not acceptable because IT can not deploy it widely)

BTW , I have tried BluetoothEnableDiscovery(NULL, false) , but it is can not work successfully when "allow bluetooth devices to find this pc" is checked...

Thanks.3d6a5a38-fc1f-4842-bff4-91bd44bb7b8e

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
{count} votes

Accepted answer
  1. Castorix31 81,636 Reputation points
    2023-03-31T09:08:13.8533333+00:00

    With BluetoothFindFirstRadio and so on then DeviceIoControl with 0x411020 code

    (some details at https://refcount.blogspot.com/2021/09/behind-bthportsys.html)

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful