Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > how to get the service "startup type" from an external windows application
 

how to get the service "startup type" from an external windows application

Hi,
I have a windows application and a service. i have to monitor the service "startuptype" from a windows application. Can any one help me in this regard.

thanks in advance
Sivakumar.V
siva_vandanapu  Thursday, November 15, 2007 7:31 AM

Hi Sivakumar.V,

Based on my understanding, the general way to get the startup type of a windows service is to handle the Win32_Service WMI class. This class provides you a field named StartMode which indicates the startup type. Check the following link, and the link has provided a sample to get the startup type.

· http://www.codeproject.com/cs/system/extendservicecontroller.asp

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Wednesday, November 21, 2007 9:25 AM

Hi Sivakumar.V,

Based on my understanding, the general way to get the startup type of a windows service is to handle the Win32_Service WMI class. This class provides you a field named StartMode which indicates the startup type. Check the following link, and the link has provided a sample to get the startup type.

· http://www.codeproject.com/cs/system/extendservicecontroller.asp

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Wednesday, November 21, 2007 9:25 AM

You can use google to search for other answers

Custom Search

More Threads

• Observer/Subject Pattern
• IssueList outlook control
• "Thought for too long"?
• Terrarium 1.2 Server -> charts fix
• Anyone know of a good .Net CF developers forum?
• Extensive Debug environment in new Terrarium?
• Please try out this software
• Source Code
• Terrarium 1.2... Are there going to be 'stones' in Terrarium?
• Why DataGridView always throw an NullReferenceException when input value at the first time after pressing ESC ??????????????