I'm trying to write a program to disable the Bluetoot开发者_如何学JAVAh service on computers (so, forbid users from connecting to Internet via Bluetooth)
I've tried following methods:
- Disable the "bthserv" service (Bluetooth Support Service). It works on Windows Vista and 7, but there is no such service in Windows XP (I haven't tested, but I think it only works with Microsoft Bluetooth Stack)
- Use Devcon.exe tool; it shows Bluetooth devices, but cannot disable them (I'm Administrator)
- I can list the devices via WMI, but how can I disable them? (I wanted to disable with netsh.exe, but it errors with "An interface with this name is not registered with the router." although the connection exists.
Any ideas ?
The API you're looking for is called the "Setup API". I seriously doubt that it's what you want, BTW. What is so special about Bluetooth networking that sets it apart from Wifi networking? Why don't you just ban adding any new network adaptor ?
精彩评论