Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何以编程方式将服务依赖项添加到已安装的 Window 服务?
如果有人建议通过System.Managementnamespace 使用 WMI 的解决方案,这将非常有帮助。我可以设置服务的依赖项的属性是什么?
System.Management
您想使用Win32_Service类的Change方法。最后一个参数是一个以双 NULL 结尾的依赖项列表。