I want to install a Windows service using a Windows command prompt (not the Visual Studio command prompt).
How do I do this?
Start and run the serviceIn Windows, open the Services desktop app. Press Windows+R to open the Run box, enter services. msc, and then press Enter or select OK.
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"
Nothing wrong with SC Create command. Just you need to know the correct args :
SC CREATE "MySVC" binpath= "D:\Me\Services\MySVC\MySVC.exe"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With