start/stop services programatically

V

vickaiser1

I am creating a setup project for an application and need to edit the
Metabase.xml file during setup. Does anyone know of a way to stop and
then restart services programatically before and after I edit this
file?

Vic
 
V

Vic

this leads me to a couple of other questions. How can I do this within a C#
method? Also, is there a way to collect the names of the <service>'s that I
need to stop, especially those using the MetaBase.xml file.
 
S

Steve C. Orr [MVP, MCSD]

Simply drag a Windows Service from your server explorer window onto a
webform. This will create a nice simple control on your form and you can
call the start and stop methods on it. You can use the same component
programatically from other classes too. Tip: You may need to use
impersonation to have the necessary permissions to start & stop windows
services.
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top