Click here to Skip to main content
15,789,698 members
Home / Discussions / C#
   

C#

 
GeneralRe: Argument-substitution vs Concatenation Pin
leppie16-Apr-03 13:54
leppie16-Apr-03 13:54 
GeneralDateTime Operation Pin
Mazdak16-Apr-03 4:52
Mazdak16-Apr-03 4:52 
GeneralRe: DateTime Operation Pin
Jim Stewart16-Apr-03 5:21
Jim Stewart16-Apr-03 5:21 
GeneralRe: DateTime Operation Pin
Mazdak16-Apr-03 5:42
Mazdak16-Apr-03 5:42 
GeneralLoad File Pin
Mazdak16-Apr-03 3:48
Mazdak16-Apr-03 3:48 
GeneralRe: Load File Pin
Chris Austin16-Apr-03 6:19
Chris Austin16-Apr-03 6:19 
GeneralRe: Load File Pin
Mazdak16-Apr-03 9:15
Mazdak16-Apr-03 9:15 
GeneralCheck if a windows service is installed Pin
AndyLatham16-Apr-03 3:20
AndyLatham16-Apr-03 3:20 
I am writing a utility to check the health of an application and I would like to check if a particular Windows service is installed and if it is whether it is running or not.
I have used the System.ServiceProcess.ServiceController class to see if a service is running or not (and this works fine) but I can't find a way to trap if the service is actually installed.
I could interate through the ServiceController[] using GetServices but this seems to be a bit "clunky" particularly becauseI want to check the existence of a number of services as the utility loads.
Is there a class/method that will do this for me?
Anyone got any ideas on how to do it?

Thanks for your help
Andy
GeneralRe: Check if a windows service is installed Pin
Mazdak16-Apr-03 3:52
Mazdak16-Apr-03 3:52 
GeneralRe: Check if a windows service is installed Pin
AndyLatham16-Apr-03 5:06
AndyLatham16-Apr-03 5:06 
GeneralRe: Check if a windows service is installed Pin
Mazdak16-Apr-03 5:42
Mazdak16-Apr-03 5:42 
GeneralRe: Check if a windows service is installed Pin
AndyLatham16-Apr-03 6:04
AndyLatham16-Apr-03 6:04 
GeneralRe: Check if a windows service is installed Pin
sludgenz29-Oct-08 17:22
sludgenz29-Oct-08 17:22 
GeneralRe: Check if a windows service is installed Pin
AnnDunbar19-Jan-09 5:55
AnnDunbar19-Jan-09 5:55 
GeneralTerminate C# app at system shutdown Pin
pahlsson15-Apr-03 23:19
pahlsson15-Apr-03 23:19 
GeneralRe: Terminate C# app at system shutdown Pin
perlmunger16-Apr-03 7:07
perlmunger16-Apr-03 7:07 
GeneralRe: Terminate C# app at system shutdown Pin
pahlsson16-Apr-03 7:10
pahlsson16-Apr-03 7:10 
GeneralRe: Terminate C# app at system shutdown Pin
perlmunger16-Apr-03 7:56
perlmunger16-Apr-03 7:56 
GeneralRe: Terminate C# app at system shutdown Pin
Jon Newman16-Apr-03 7:31
Jon Newman16-Apr-03 7:31 
GeneralRe: Terminate C# app at system shutdown Pin
James T. Johnson16-Apr-03 8:12
James T. Johnson16-Apr-03 8:12 
GeneralRe: Terminate C# app at system shutdown Pin
pahlsson16-Apr-03 8:17
pahlsson16-Apr-03 8:17 
GeneralRe: Terminate C# app at system shutdown Pin
pahlsson16-Apr-03 8:21
pahlsson16-Apr-03 8:21 
QuestionDirectory Dialog Box?? Pin
bania15-Apr-03 16:17
bania15-Apr-03 16:17 
AnswerRe: Directory Dialog Box?? Pin
Chris Austin15-Apr-03 19:54
Chris Austin15-Apr-03 19:54 
AnswerRe: Directory Dialog Box?? Pin
chito15-Apr-03 23:09
chito15-Apr-03 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.