Articles → .NET WINDOWS SERVICE → Basic Example of Windows Service in .Net

Basic Example of Windows Service in .Net






Objective of this Tutorial













Steps Involved















Step 1: Create a window Service








Picture showing the code in visual studio for windows service application

Click to Enlarge


Step 2: Modify OnStart() method of Windows

Service(If Required)













Step 3: Add the Service Installer to the Windows service












Picture showing how to add project installer in windows service application

Click to Enlarge




Step 4: Use ‘installutil.exe’ on the command line to install

the service










Picture showing the command line window for installing windows service using the installutil command

Click to Enlarge













Picture showing the window service inside the services.msc

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, February 15, 2010
 
Updated On  -  Wednesday, February 26, 2014

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250