I have no experience writing batch scripts, but I was wondering if there was a way to install a .NET Windows service using installutil.exe
using such a script, or u
I did this with an old fashioned batch file....
Copy the installutil.exe into the same directory as your executable (to make things easier) The following is a generic example of the contents of the batch file necessary: (mine was just names instal.bat)
installutil MyService.exe
sc config MyService type= interact type= own
sc failure MyService reset= 6000 actions= restart/5000/restart/5000/restart/5000
sc start MyService
For more info on command line options for installutil.exe, see here.
To uninstall the service, use a different batch file with the following contents:
installutil MyService.exe /u