Window service

  • Thread starter Thread starter AMP
  • Start date Start date
A

AMP

I am trying to find the details of all the services that are running
a machine

I have used

Dim services() As ServiceController
Dim i As Integer
services = System.ServiceProcess.ServiceController.GetServices()
For i = 0 To services.Length - 1
msgbox (services(i).DisplayName) '
to get the service name
msgbox (services(i).Status.ToString) '
to get the running status
Next


How do I get the startup Type (Manual,Automatic,Disabled) ?


In VB.net2005
 
You can read registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\{ServiceName}\Start =
2 (Automatic), 3 (Manual), or 4 (Disabled).

http://www.alvas.net - Audio tools for C# and VB.Net developers
 
Back
Top