|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to check if windows service is installed / VB.NETWhat is the elegant way in VB.NET to check whether a windows service is
installed or not? How does the service controller tell this? thanks herbert It's in the System Registry.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services -- Show quoteHTH, Kevin Spencer Microsoft MVP ..Net Developer Who is Mighty Abbott? A twin turret scalawag. "herbert" <herb***@discussions.microsoft.com> wrote in message news:9A42EA84-C7FC-40DC-8795-12FE9B5BCDB6@microsoft.com... > What is the elegant way in VB.NET to check whether a windows service is > installed or not? > > How does the service controller tell this? > > thanks herbert Imports System.ServiceProcess
Module Module1 Sub Main() Dim services() As ServiceController = ServiceController.GetServices() For Each service As ServiceController In services ' Do comparison here to determine if service is installed Next End Sub End Module Show quote "herbert" <herb***@discussions.microsoft.com> wrote in message news:9A42EA84-C7FC-40DC-8795-12FE9B5BCDB6@microsoft.com... > What is the elegant way in VB.NET to check whether a windows service is > installed or not? > > How does the service controller tell this? > > thanks herbert |
|||||||||||||||||||||||