If you've installed .Net in the default location InstallUtil.exe lives in C:\Windows\Microsoft.Net\Framework\v2.0.50727\InstallUtil.exe
in the respective framework version directory.
Below is an example batch file.
C:\Windows\Microsoft.Net\Framework\v2.0.50727\InstallUtil.exe C:\Dev\Server\SourceCode\bin\Debug\server_service.exeand to uninstall, use the /u flag
pause
C:\Windows\Microsoft.Net\Framework\v2.0.50727\InstallUtil.exe /u C:\Dev\Server\SourceCode\bin\Debug\server_service.exeUsing these batch files we just create short cuts to them and can double click the short cut to install or uninstall. Of course you can install/uninstall more than one service in the batch file.
pause
Be sure to also check out the other flags available for InstallUtil.
No comments:
Post a Comment