安装:%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe ServiceTest.exe
启动:Net Start service1
设置为自动启动:sc config service1 start= auto
卸载:%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe /u ServiceTest.exe
原文:http://www.cnblogs.com/dayang12525/p/6377557.html