I am currently writing a service for windows and I am frequently tweeking it and updating it on to my test computer. I would like to write a script that automaticly stops the service, updates the exe and restarts the service. however its that stop and start part that I am having trouble with.
The computer I am connecting to is not on a domain and we do not share a username and password. I figure my best bet is to do
sc.exe \\testsvr stop "myService" however because I do not have a domain or shared usernames and passwords this gives me a "Access is denied" message.
I can very easily just add the user but I wanted this as a learning experience for when I am not able to change the users.