• A2ZMenu.Com
Loading
  • Home
  • Blogs
    • AJAX
    • ASP.NET
    • BI
    • CSharp
    • JavaScript
    • LINQ
    • Miscellaneous
    • SQL
    • SharePoint
    • Silverlight
    • WCF
  • Tutorials
    • HTML5
    • ASP.NET 4.0
    • CSharp
    • SharePoint
    • SQL Function
  • Online Exam
    • ASP.NET
    • LINQ
    • Silverlight
    • SQL
    • JavaScript
    • SharePoint
  • Forum
  • Utility
  • Fun @ Work
    • Appraisal
    • Funny Images
    • Funny Puzzle
    • Miscellaneous
    • Motivating Stories
  • Wiki
  • Contact Us
  • AJAX
  • ASP.NET
  • BI
  • CSharp
  • JavaScript
  • LINQ
  • Miscellaneous
  • SQL
  • SharePoint
  • Silverlight
  • WCF

Test Your Skill

Show/Hide
 Q. Out of Boxing and Unboxing which one is implicit?
View all questions...
Using InstallUtil to install/uninstall service
Tweet
mail-image

In one of the tutorial (CreateWindows Service in C#) I explained how to created windows service along with the steps for creating a setup project to install/uninstall the service. But it's not that you always need to create a setup project to install/uninstall the service.This can be easily achieved using the InstallUtil command.
 
When using this command installation is done in a transactioned way: i.e. if any one of the assembly fail to install, installations of all the assemblies will be rolled back. Uninstall is not transactioned.
 
Steps: 1 Open the command prompt(make sure to Run as Administrator if using Vista or any other newer version Windows[Always run application as Administrator]) and traverse to the path

C:\Windows\Microsoft.NET\Framework\v4.0.30319

Note: Chose the.NET framework you are using(I am using .NET framework 4.0 as depicted by v4.0.30319).
 
Skip step 1 if using the visual studio command prompt
 
Step: 2 Run the installutil command without any switch.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>InstallUtil "ServiceName"
 
Step: 3 Navigate to Services using (run -> services.msc), search for your service and start it.
 
Again to uninstall the service, using the command mentioned in step 2 with /u switch.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>InstallUtil /u "ServiceName"
 


Add Comment

Comment
Name
 (Required)
E-mail (Privacy assured)
 (Required)

Poll of the Day

  Who is best CEO so far?
 
 
 

Related Contents

Online Test Papers

  • ASP.NET
  • JavaScript
  • LINQ
  • SharePoint
  • Silverlight
  • SQL

Related Tutorials

  • HTML 5 Tutorial
  • SharePoint Best Practice
  • ASP.NET 4.0 Tutorials

Connect with Facebook

Top Blogs

  • SharePoint 2010 Model Dialog
  • Validation of viewstate MAC failed. If this application is hosted...
  • Silverlight: ListBox with CheckBox
  • Creating a Windows Service in C#
  • Using InstallUtil to install/uninstall service
  • How to call webservice using Ajax or JavaScript
  • LINQ to SQL Best Practice
  • The contract name could not be found in the list of contracts implemented by the service
  • Calling JavaScript function from C#
Blogs
  • AJAX
  • ASP.NET
  • BI
  • CSharp
  • HTML
  • JavaScript
  • LINQ
  • SQL Server
  • SharePoint
  • Silverlight
Tutorials
  • HTML5
  • ASP.NET 4.0
  • CSharp
  • SharePoint
  • SQL Server
Online Examinations
  • ASP.NET
  • LINQ
  • SQL Server
  • JavaScript
  • SharePoint
Online Utilities
  • Age Calculator
  • Happy Birthday Wisher
  • Independence Day Wisher
  • URL Encoder Decoder
  •  
Fun @ Work
  • Appraisal
  • Funny Images
  • Funny Puzzle
  • Miscellaneous
  • Motivating Stories
A2ZMenu © 2012 Home | Contact Us | Privacy Policy | Connect with Facebook | Follow us on Twitter