启动
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe E:\Debug\WindowsServiceTest.exe
Net Start FileService
sc config FileService start= auto
pause
关闭
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe /u E:\Debug\WindowsServiceTest.exe
pause
pause-------(保持窗口不关闭,可以去掉)