net stop service

  • Thread starter Thread starter yqyq22
  • Start date Start date
Y

yqyq22

Hi all,
Is there a way to stop a service eg. net stop "dns client" without to
invoke .bat or .cmd?
I didn't find nothing ( no class etc) with google about this.
THANKS IN ADVANCE.
 
yqyq22 said:
Hi all,
Is there a way to stop a service eg. net stop "dns client" without to
invoke .bat or .cmd?
I didn't find nothing ( no class etc) with google about this.
THANKS IN ADVANCE.

Look at the System.ServiceProcess.ServiceController class.
 

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

Back
Top