我目前正在使用WMI在我的C#代码中启动一个服务,我想设置它的启动参数。
有办法这样做吗?到目前为止我没有找到任何相关的东西。
提前谢谢。
托马斯。
发布于 2014-10-21 08:51:50
发布于 2014-10-23 11:14:30
检查开放源码项目
包含StartService对WMI的全面使用。
示例VB.Net:
Dim objPath = "\\ComputerName\root\cimv2:Win32_Service.Name='ServiceName'"
Using objService As New ManagementObject(objPath)
Dim outParams = objService.InvokeMethod("StartService", Nothing)
rtnVal.WmiValue = CInt(outParams)
End Usinghttps://stackoverflow.com/questions/25770688
复制相似问题