0
A
回答
0
Setting Windows Service Account - C# and WMI有一些c#可能會幫助 - 它應該很容易convert到VB。
具體而言,comment by asbf看起來有你所需要的。
string serviceName = "eventLog";
System.Management.SelectQuery query = new System.Management.SelectQuery(string.Format("select name, startname from Win32_Service where name = '{0}'", serviceName));
using (System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(query))
{
foreach (System.Management.ManagementObject service in searcher.Get())
{
Console.WriteLine(string.Format("Name: {0} - Logon : {1} ", service["Name"], service["startname"]));
}
}
相關問題
- 1. Windows服務的屬性 - 登錄
- 2. 爲什麼登錄屬性爲空?
- 3. C#WMI Win32_ScheduledJob屬性
- 4. 獲取WMI屬性
- 5. 作爲服務登錄vs作爲批處理作業登錄
- 6. 登錄WCF服務
- 7. WMI與WCF服務
- 8. Windows服務與WMI
- 9. iPhone,WMI,iis服務
- 10. 登錄到服務器時未登錄到服務器
- 11. Django作爲服務登錄和註銷
- 12. Marklogic作爲登錄服務器
- 13. 作爲LocalSystem登錄SQL服務
- 14. WMI更改名稱屬性
- 15. 從WMI拉多個屬性
- 16. WSMAN和WMI系統屬性
- 17. WMI查詢空屬性
- 18. wmi:屬性返回null
- 19. 如何登錄Azure以編程方式檢索PowerShell中的雲服務屬性?
- 20. Windows服務屬性
- 21. 如何登錄Web服務
- 22. .NET Winform AJAX登錄服務
- 23. 登錄到網絡服務
- 24. Symfony 2 - 登錄服務
- 25. 登錄到PHP服務器
- 26. asp.net web服務登錄
- 27. 登錄HTTP服務器C++
- 28. Moodle外部服務登錄
- 29. SQLServer服務登錄憑證
- 30. 登錄谷歌服務器