Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
GeneralRe: Argument-substitution vs Concatenation Pin
leppie16-Apr-03 12:54
leppie16-Apr-03 12:54 
GeneralDateTime Operation Pin
Mazdak16-Apr-03 3:52
Mazdak16-Apr-03 3:52 
GeneralRe: DateTime Operation Pin
Jim Stewart16-Apr-03 4:21
Jim Stewart16-Apr-03 4:21 
GeneralRe: DateTime Operation Pin
Mazdak16-Apr-03 4:42
Mazdak16-Apr-03 4:42 
GeneralLoad File Pin
Mazdak16-Apr-03 2:48
Mazdak16-Apr-03 2:48 
GeneralRe: Load File Pin
Chris Austin16-Apr-03 5:19
Chris Austin16-Apr-03 5:19 
GeneralRe: Load File Pin
Mazdak16-Apr-03 8:15
Mazdak16-Apr-03 8:15 
GeneralCheck if a windows service is installed Pin
AndyLatham16-Apr-03 2:20
AndyLatham16-Apr-03 2: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 2:52
Mazdak16-Apr-03 2:52 
GeneralRe: Check if a windows service is installed Pin
AndyLatham16-Apr-03 4:06
AndyLatham16-Apr-03 4:06 
GeneralRe: Check if a windows service is installed Pin
Mazdak16-Apr-03 4:42
Mazdak16-Apr-03 4:42 
GeneralRe: Check if a windows service is installed Pin
AndyLatham16-Apr-03 5:04
AndyLatham16-Apr-03 5:04 
GeneralRe: Check if a windows service is installed Pin
sludgenz29-Oct-08 16:22
sludgenz29-Oct-08 16:22 
GeneralRe: Check if a windows service is installed Pin
AnnDunbar19-Jan-09 4:55
AnnDunbar19-Jan-09 4:55 
GeneralTerminate C# app at system shutdown Pin
pahlsson15-Apr-03 22:19
pahlsson15-Apr-03 22:19 
GeneralRe: Terminate C# app at system shutdown Pin
perlmunger16-Apr-03 6:07
perlmunger16-Apr-03 6:07 
GeneralRe: Terminate C# app at system shutdown Pin
pahlsson16-Apr-03 6:10
pahlsson16-Apr-03 6:10 
GeneralRe: Terminate C# app at system shutdown Pin
perlmunger16-Apr-03 6:56
perlmunger16-Apr-03 6:56 
GeneralRe: Terminate C# app at system shutdown Pin
Jon Newman16-Apr-03 6:31
Jon Newman16-Apr-03 6:31 
GeneralRe: Terminate C# app at system shutdown Pin
James T. Johnson16-Apr-03 7:12
James T. Johnson16-Apr-03 7:12 
GeneralRe: Terminate C# app at system shutdown Pin
pahlsson16-Apr-03 7:17
pahlsson16-Apr-03 7:17 
GeneralRe: Terminate C# app at system shutdown Pin
pahlsson16-Apr-03 7:21
pahlsson16-Apr-03 7:21 
QuestionDirectory Dialog Box?? Pin
bania15-Apr-03 15:17
bania15-Apr-03 15:17 
AnswerRe: Directory Dialog Box?? Pin
Chris Austin15-Apr-03 18:54
Chris Austin15-Apr-03 18:54 
AnswerRe: Directory Dialog Box?? Pin
chito15-Apr-03 22:09
chito15-Apr-03 22: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.