Click here to Skip to main content
15,884,472 members
Articles / Operating Systems / Windows
Tip/Trick

Install Windows Service

Rate me:
Please Sign up or sign in to vote.
4.20/5 (4 votes)
21 Jan 2010CPOL1 min read 108.7K   10   6
Today I am going to explain you a simple and quick way to install a Windows Service in your machine.First you must write a Windows Service in your preferred language like (C#,VB.NET etc...). Then follow these quick steps.You have to get the support of .NET SDK Command prompt for install...
Today I am going to explain you a simple and quick way to install a Windows Service in your machine.
First you must write a Windows Service in your preferred language like (C#,VB.NET etc...). Then follow these quick steps.

You have to get the support of .NET SDK Command prompt for install the service into your local machine.
1. Call to SDK Command prompt, follow
Start>All Programs>Microsoft .NET Framework SDK v2.0>SDK Command prompt

*(this is very much similar to windows command prompt, but windows command prompt cannot understand these instructions)

2. Type in the SDK command prompt
installutil C:\MyWebServiceApp\bin\Debug\MyService.exe
this is your application's .exe path.

Now your Windows service has successfully installed with Windows Environment. To start that, go to
Start>Run type services.msc and run it.

In this services window, find your Windows Service and Write Click on it and select Properties. Set Startup type as Automatic or Manual.

Now restart you machine and find your Windows Service by Task Manager. It will display in task manager under running services.

I think you got it. Please leave your comment on my tips. It will encourage me. Bye


Alternative: after installing the service, use the Service control manager to configure and start it:
in the console window type:
SC Config MyService obj="Account Name" start = (boot|delayed-auto|system|demand|auto|disabled)
to start the servixce type:
SC start MyService

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder EdgeCat Infosys
Sri Lanka Sri Lanka
http://edgecat.weebly.com

Comments and Discussions

 
Questionnice work Pin
Member 1039122722-Sep-15 20:12
Member 1039122722-Sep-15 20:12 
GeneralMy vote of 3 Pin
bejituharo23-Jun-15 23:03
bejituharo23-Jun-15 23:03 
Questionwindows service Instalation Pin
shilpavV4421-Jan-15 8:20
shilpavV4421-Jan-15 8:20 
QuestionAfter installing my windows service there is start and stop all options are disabled please any body help Pin
Member 1005644722-Apr-14 20:50
Member 1005644722-Apr-14 20:50 
After installing my windows service there is start and stop all options are disabled please any body help
General"Installation has failed, Rollback has been successfully" Pin
coolnavjot3110-Feb-13 18:25
coolnavjot3110-Feb-13 18:25 
GeneralRe: "Installation has failed, Rollback has been successfully" Pin
unikoon2-Jul-15 20:56
unikoon2-Jul-15 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.