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.

Advertisements

One Response to Working with windows service

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: