Navigate to the installutil.exe in your .net folder (for .net 4 it's C:WindowsMicrosoft.NETFrameworkv4.0.30319 for example) and use it to install your service, like this:
"C:WindowsMicrosoft.NETFrameworkv4.0.30319installutil.exe" "c:myservice.exe"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…