Windows服务器注册停止 打开CMD窗口--开始--运行--输入CMD,回车 注册服务命令 cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 (这里可以根据自己机器安装的.NET版本来选择路径) InstallUtil.exe D:\HardWareServerService.exe (HardWareServerService为工程的名字) net start ComputerService (ComputerService是服务的名字) 取消注册服务 cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 InstallUtil.exe /u d:\HardWareServerService.exe 从您的C# 解决方案下拷贝HardWareServerService.exe文件到D盘HardWareServerService.exe InstallUtil.exe D:\HardWareServerService.exe net start ComputerService