To install a web service using the command prompt,
1. start up the command prompt (CMD) with administrator rights.
2. Type “cd c:\windows\framework\microsoft.net\framework\v4.0.3019\installutil.exe [your windows service path the exe]”
3. Press return and thats that!
Advertisements
Comments on: "How to install a Windows Service using the command prompt?" (2)
I have an install/uninstall batch file for this:
Install:
@ECHO OFF
set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX2%
echo Installing WindowsService…
echo —————————————————
InstallUtil /i MyWindowsService.exe
echo —————————————————
echo Done.
Uninstall:
@ECHO OFF
set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX2%
echo uninstalling WindowsService…
echo —————————————————
InstallUtil /u MyWindowsService.exe
echo —————————————————
echo Done.
That’s a very handy batch file. Thanks for sharing it!