[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

configure Windows service

is it possible to start the windows service automatically after installation?
0
singsunn
Asked:
singsunn
  • 2
2 Solutions
 
mikhoCommented:
try starting it with code.... example here :
http://www.csharp-examples.net/restart-windows-service/
0
 
jkrCommented:
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
 
jkrCommented:
Ooops, to directly start it, that's just

sc myservice start
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now