C#如何用程序禁用光驱(禁用第三方刻录软件,绿色软件修改注册表不行)??????在线等
2条回答 默认 最新
- oyljerry 2014-12-29 05:41关注
通过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# ;-)
解决 1无用