新建WindowService
单击“Service1.cs”
配置1,项目名字为“WindowsServiceInRfqFile”,服务名字(Servicename):ServiceRfqFile
配置二
然后,“生成项目”
找到Bin文件
这个“InstallUtil.exe”。可以在Vs的安装包中找到:C:\Windows\Microsoft.NET\Framework\v2.0.50727
安装程序:
cd /d “%~dp0”
InstallUtil WindowsServiceInRfqFile.exe
net start ServiceRfqFile
pause
卸载程序:
cd /d “%~dp0”
InstallUtil /u WindowsServiceInRfqFile.exe
pause