Tuesday, 28 April 2015

create service to run exe file

Open Command Prompt
Go to this path: C:\Windows\SysWOW64>
Type: sc.exe
 You will get all help commands..
To create a service you have to use..
sc.exe create  command

Ex: 
sc.exe create ServiceName binPath= "D:\myexeFile.exe" DisplayName= "MyService"

Make sure you give space after =

sc.exe start ServiceName
sc.exe stop ServiceName
sc.exe delete ServiceName

Good one: https://www.youtube.com/watch?v=X6o1AvZ06zc