软件编译时,也需要以管理员身份运行VS
以管理员身份运行 cmd(命令行)
cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
安装服务 :InstallUtil "D:\work\SVN\CallReport\WindowsServiceCallReport\WindowsServiceCallReport\bin\Debug\WindowsServiceCallReport.exe"
卸载服务 :InstallUtil /u "D:\work\SVN\CallReport\WindowsServiceCallReport\WindowsServiceCallReport\bin\Debug\WindowsServiceCallReport.exe"
PS:.net framework2.0则需要输入 cd C:\Windows\Microsoft.NET\Framework\v2.0.50727
sc delete Service1 格式: sc delete 服务名称
时间: 2024-12-19 16:28:57