C#如何禁用光驱,急急急

C#如何用程序禁用光驱(禁用第三方刻录软件,绿色软件修改注册表不行)??????在线等

通过WMI的方式去停用service

 Set objLocator = WScript.CreateObject("WbemScripting.SWbemLocator")
Set objServices = objLocator.ConnectServer(".", "root/CIMV2")
strWMIObjectID = "Win32_SystemDriver.Name=""Cdrom"""    'Be excact here!
Set objService = objServices.Get(strWMIObjectID)
objService.ChangeStartMode strStartMode

This will become active, after the box re-starts.
I think, the same method should o in C# ;-)

可以参考这个例子

C#屏蔽光驱和USB
http://download.csdn.net/download/yuanzailin/4659414