install windows service
install windows serivce e.g
@echo off
echo ----------------------------------------------------------
echo Service Installation...
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe D:\Project\WindowsService.exe
echo Service installation completed
pause
save file name: install.bat
uninstall windows service e.g
@echo off
echo ----------------------------------------------------------
echo Start Stopping Services...
net stop UpdateUserDataToRedisService
echo Stop service completion.
pause
echo ----------------------------------------------------------
echo Unloading service in progress...
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe D:\Project\WindowsService.exe /u
echo Unloading Service Completion.
echo ----------------------------------------------------------
pause
save file name:unInstall.bat
start service
@echo off
echo ----------------------------------------------------------
echo Start the service...
net start UpdateUserDataToRedisService
echo Start service completion
echo ----------------------------------------------------------
pause
save file name: startservice.bat