Windows Service Install and Un Install in MS VisualStudio 2010


Hi Friends,

You can learn How to Install and Un Install Windows Service using Microsoft Technology.

>> 1.First get the path where InstallUtil.exe exist its
Mostly the path is same but differ version  it can be differ
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe

>> 2.Get the Path where you want to put that Service .exe file (Assume it is on "E:\MyApp\MyTestApp.exe")

>> 3.Command for Install service
Run Visual Studio Command Prompt as Run admin if Windows 8 else no need to it and Type this

C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe E:\MyApp\MyTestApp.exe -i

>> 4.Command for Un Install service
Run Visual Studio Command Prompt as Run admin if Windows 8 else no need to it and Type this

C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe E:\MyApp\MyTestApp.exe -u

>> 5.In case if you already installed Service and you can see there "services.msc" Service list and you have Deleted physically delete Service file. You Should have to remove that Service in Registry manually

Find sc and Run Command Prompt
Step 5.1 : sc.exe Utility
sc delete

Details: 
sc is a command line program used for communicating with the     nt service controller and services.
delete----------Deletes a service (from the registry).

Step 5.2  delserv
Download
http://support.microsoft.com/kb/927229
and use delserv command line utility. This is a legacy tool developed for Windows 2000. In current Window XP boxes this was superseded by sc described in method 1.

Step 5.3 - manually delete registry entries
Windows services are registered under the following registry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Click Here For More Remove Service for Stpep 5 

Comments

Popular posts from this blog

Draw Line and Text on Bitmap Image in C#

Create Folder / Directory using SQL Server