Solved

configure Windows service

Posted on 2012-03-28
3
288 Views
Last Modified: 2012-04-14
is it possible to start the windows service automatically after installation?
0
Comment
Question by:singsunn
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
mikho earned 250 total points
ID: 37779171
try starting it with code.... example here :
http://www.csharp-examples.net/restart-windows-service/
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 250 total points
ID: 37779228
All you need to do is setting 'SERVICE_AUTO_START' as the 'dwStartType' parameter to 'CreateService()' (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682450(v=vs.85).aspx). Alternatively, use 'sc.exe' after the installation, i.e.

sc config myservice start=auto
0
 
LVL 86

Expert Comment

by:jkr
ID: 37779562
Ooops, to directly start it, that's just

sc myservice start
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now