Tuesday, 7 November 2017
Install or UnInstall Windows Service With or Without using Visual Studio Command Prompt
in: csharp vs
Using Visual Studio Command Prompt:-
Install:-
Go to "Start" >> "All Programs" >> "Microsoft Visual Studio 2012" >> "Visual Studio Tools" then click "Developer Command Prompt for VS2012".
Type the following command: cd <physical location of your TestWindowService.exe file>
in my case it is :
cd C:\Sandbox\WindowServices\TestWindowService\TestWindowService\bin\Debug
Next type the following command:
InstallUtil.exe “TestWindowService.exe” and press Enter.
UnInstall:-
Go to "Start" >> "All Programs" >> "Microsoft Visual Studio 2012" >> "Visual Studio Tools" then click "Developer Command Prompt for VS2012".
Type the following command: cd <physical location of your TestWindowService.exe file>
in my case it is :
cd C:\Sandbox\WindowServices\TestWindowService\TestWindowService\bin\Debug
Next type the following command:
InstallUtil.exe /u “TestWindowService.exe” and press Enter.
Without Using Visual Studio Command prompt:-
In Certain Situation we don't have Visual Studio installed in certain System or in Server so that there is no "Developer Command Prompt" exist. But in each System Command Prompt Exists. So we can use Comman Prompt in each and every System to Install as well as UnInstall Windows Service.
Install:-
sc create TestWindowService binpath= "C:\Sandbox\WindowServices\TestWindowService\ TestWindowService\bin\Debug\TestWindowService.exe" and press enter.
Note:- Please make sure that there should be one Space present after binpath=
UnInstall:-
sc delete TestWindowService
RELATED POSTS

If Else Vs Switch in C#.
In this article, We will discuss about When to Use If Else and When to U ...

Formatting of numbers by leading zeros in C#.
In this article we will discuss about How to Format of Numbers by leading ...

HTTP Error 500.22 - Internal Server Error (An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.)
The issue is caused by the pipeline mode in your Application Pool setting ...

Named Parameters in C#.
In this article we will discuss about How to use Named Parameters in C#. ...
-
This issue is Completely related to EntityFramework and this issue arises whenever you have installed EntityFramework in one project at th...
-
This is generally a Common Problem or the error could be like this, To Resolve this error, One Small Solution is Exists which is as b...
-
In this article, We will discuss What is the above Error and How to resolve this Error. Whenever, We are Restoring our database into A...
0 comments:
Post a Comment