As part of an MSDeploy post step I run
sc create MyService binPath= "C:\Services\MyService"
(Note that this command is run from the remote server)
Trying to start/delete the service using sc or via the UI results in an Access Denied error which doesn't make sense. Why would the local system not be allowed to do that? You can't go to the service folder and add local system as a user..
What am I doing wrong?
If I need to use another account such as Local Service or Network Service how do I specify the account to use in my sc create command?
Yikes, I specified the name of the directory rather than including the executable.
Apparently
scwill still create the service without error.