How Can I get "Description" in Windows Services?

  • Thread starter Thread starter Ashidacchi
  • Start date Start date
A

Ashidacchi

Guest
Hi,

I am writing VB.NET code (Windows Forms) for displaying Windows Services. I can get ServiceName, DisplayName, Status, StartType, but cannot "Description". How can I get it?
1486652.png

Here's my code for displaying services in DataGridView.

Dim scSvcs() As ServiceController = ServiceController.GetServices()
Dim sc As ServiceController
Dim myRow As Integer = 0
For Each sc In scSvcs
Me.dgv_List.Rows.Add()
Me.dgv_List(0, myRow).Value = sc.Status
Me.dgv_List(1, myRow).Value = sc.ServiceName
Me.dgv_List(2, myRow).Value = sc.DisplayName
Me.dgv_List(3, myRow).Value = sc.StartType
Me.dgv_List(4, myRow).Value = "??? Description ???" ' <== This is what I want to get
myRow += 1
Next
Best Regards,
Ashidacchi -- ソフト開発の北窓舎(ほくそうしゃ)トップページ

Continue reading...
 
Back
Top