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. 獲取WMI屬性
- 4. 作爲服務登錄vs作爲批處理作業登錄
- 5. 登錄WCF服務
- 6. Windows服務與WMI
- 7. iPhone,WMI,iis服務
- 8. WMI與WCF服務
- 9. 登錄到服務器時未登錄到服務器
- 10. 作爲LocalSystem登錄SQL服務
- 11. Marklogic作爲登錄服務器
- 12. WMI查詢空屬性
- 13. WMI更改名稱屬性
- 14. WSMAN和WMI系統屬性
- 15. wmi:屬性返回null
- 16. SQLServer服務登錄憑證
- 17. 登錄到PHP服務器
- 18. .NET Winform AJAX登錄服務
- 19. 登錄谷歌服務器
- 20. 當前登錄用戶的Teamcity屬性
- 21. 讀行家服務器屬性爲屬性
- 22. 性能監控的SQL Server,而不是登錄到服務器
- 23. 查找其帳戶的服務被設置爲「登錄爲」
- 24. Android 2.1上的Google登錄服務?
- 25. 登錄web服務的啓動/停止
- 26. 單一登錄Bluemix上的服務
- 27. fb:登錄按鈕屬性事件api
- 28. WCF PrincipalPermission屬性異常登錄
- 29. 使用ADSI設置「作爲服務登錄」和「允許本地登錄」
- 30. angular2組服務屬性