I just want to start/stop service just on my pc (no remote connection) via bat script in a way that no "Run as admin" prompt appears. Just don't want to do any manual interaction after running the script. I have found articles showing that this would be possible via PSTools (PSExec or PSTools in particular). It is ok to me that password is visible inside a script. But when I run the following command:
psexec -u myuser -p mypass net stop myserviceI get: net exited with error code 2.
When I try to use -h:
psexec -h -u myuser -p mypass net stop myserviceI get: Couldn't install PSEXESVC service: The network path was not found. Make sure that the admin$ share is enabled. I don't know what admin share is, don't want to share something on the network.
Whiles using on PSService:
psservice -u myuser -p mypass stop myserviceThe folowing error is shown: Error opening myservice on \\MY-PC: Access is denied.
myuser is the only user on the pc, and it's admin. Isn't there a simple solution on this? Other tools can be used also. Disabling UAC is not an option.