Install. bat
@ Echo off
Rem the following directory is for. NET 2.0
Set dotnetfx2 = % SystemRoot % \ Microsoft. NET \ framework \ v2.0.50727
Set Path = % PATH %; % dotnetfx2 %
Echo installing windowsservice...
Echo ---------------------------------------------------
Start installutil/I services1.exe
Echo ---------------------------------------------------
Echo done.
Uninstall. bat
@ Echo off
Rem the following directory is for. NET 2.0
Set dotnetfx2 = % SystemRoot % \ Microsoft. NET \ framework \ v2.0.50727
Set Path = % PATH %; % dotnetfx2 %
Echo installing windowsservice...
Echo ---------------------------------------------------
Start installutil/u service1.exe
Echo ---------------------------------------------------
Echo done.
Put the same directory as the compiled file, OK
In. Net 4.0, change
Set dotnetfx2 = % SystemRoot % \ Microsoft. NET \ framework \ v4.0.30319
Attach a winservice framework for download