views:

49

answers:

1

Hi I'm trying to write a program to disable the Bluetooth service on computers (so, forbid users from connecting to Internet via Bluetooth)

I've tried following methods:

  1. 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)
  2. Use Devcon.exe tool; it shows Bluetooth devices, but cannot disable them (I'm Administrator)
  3. 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 ?

+1  A: 

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 ?

MSalters
Because there are tens of computers that I want install this program on them and they already have Bluetooth installed (I want users just use the LAN to use Internet, not Bluetooth. And they don't have Wireless equipments)
Mehdi Asgari
By the way, how can I programmatically ban users from adding any Network adapters ?
Mehdi Asgari
In an environment where you need this, i.e. where you can't trust your users, you have to assume that they might add USB-connected WiFi adaptors. Or UMTS dongles. Banning the addition of network adaptors is a Group Policy afaik, please search serverfault.com.
MSalters