Window service

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
 
A

Alexander Vasilevsky

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top