Solved

configure Windows service

Posted on 2012-03-28
3
301 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

809 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