I want to restart services which is located to a different server using ASP classic, but it's not working on my end.
I have a 2 batch files that will stop and start multiple services in another remote server:
sc \\<machine address> stop service1
sc \\<machine address> stop service2
sc \\<machine address> start service1
sc \\<machine address> start service2
And I will call it from my ASP classic code which is done like this:
dim wshell
set wshell = CreateObject("WScript.Shell")
wshell.run "c:\folder1\stopService.bat"
wshell.run "c:\folder1\startService.bat"
set wshell = nothing
With these codes, It still doesn't work. I've read a solution similar to this problem to change the ApplicationPool to LocalSystem and to give enough permission to the file. But still doesn't work for me.
What am I missing something to solve this problem?
Please help! Thanks!