Install a Windows service using a Windows command prompt?
问题 I want to install a Windows service using a Windows command prompt (not the Visual Studio command prompt). How do I do this? 回答1: Navigate to the installutil.exe in your .net folder (for .net 4 it's C:\Windows\Microsoft.NET\Framework\v4.0.30319 for example) and use it to install your service, like this: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe" "c:\myservice.exe" 回答2: Nothing wrong with SC Create command. Just you need to know the correct args : SC CREATE "MySVC" binpath