Working with windows service

Steps to make a windows service work:

  • Create the windows service as usual.
  • Build the service.
  • Goto command prompt and install the .exe file of the service(present inside the debug folder) using the sc command.
    • sc create [ServiceName] binpath= [exe file path]
  • Goto services -> right click on [ServiceName] and click start.
  • To delete the service the command is
    • sc delete [ServiceName]

Important Note: There is no need to create a separate setup file for this.


One Response to Working with windows service

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: