Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to start Windows services from C# code

Reply
Thread Tools

How to start Windows services from C# code

 
 
nivedita
Guest
Posts: n/a
 
      07-31-2008
I got below function from http://techinterviewquestion.blogspot.com/
blog. it is working fine. i used

public void StartService(string ServiceName)
{
ServiceController sc = new ServiceController(ServiceName);
if (sc != null && sc.Status == ServiceControllerStatus.Stopped)
{

sc.Start();
sc.WaitForStatus(ServiceControllerStatus.Running);

}
}
 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      07-31-2008
re:
!> do you have an issue with ASP.NET...?

Nah. He's spamming this newsgroup.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> "nivedita" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> I got below function from http://techinterviewquestion.blogspot.com/
>> blog. it is working fine. i used

>
> This is the ASP.NET newsgroup - do you have an issue with ASP.NET...?
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
 
 
 
Munna
Guest
Posts: n/a
 
      07-31-2008
HI,

As mark said not a asp.net related.. but yet...

check out this.

http://www.dotnetspider.com/resource...ogrammati.aspx

Might help you!

Best of luck

Munna
 
Reply With Quote
 
Munna
Guest
Posts: n/a
 
      07-31-2008
Yep ... she is spamming! .. checked her other posts... totally
spamming!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Performance Tutorials Services - Boosting Performance by DisablingUnnecessary Services on Windows XP Home Edition Software Engineer Javascript 0 06-10-2011 02:18 AM
ASPX : ACCESS denied when start/stop windows services SenthilVel ASP .Net 5 01-16-2009 04:49 PM
Start Web services as Windows Services start Anup ASP .Net 1 05-09-2006 11:44 AM
What is the difference between C# windows Services and web services in vs.net? Nick ASP .Net 1 09-12-2005 02:33 PM



Advertisments