【发布时间】:2014-09-24 14:51:49
【问题描述】:
我想使用 ASP Classic 重新启动位于另一台服务器的服务,但它在我这边不起作用。
我有 2 个批处理文件,它们将在另一个远程服务器中停止和启动多个服务:
sc \\<machine address> stop service1
sc \\<machine address> stop service2
sc \\<machine address> start service1
sc \\<machine address> start service2
我将从我的 ASP 经典代码中调用它,如下所示:
dim wshell
set wshell = CreateObject("WScript.Shell")
wshell.run "c:\folder1\stopService.bat"
wshell.run "c:\folder1\startService.bat"
set wshell = nothing
使用这些代码,它仍然无法正常工作。我已经阅读了与此问题类似的解决方案,将 ApplicationPool 更改为 LocalSystem 并为文件提供足够的权限。但仍然不适合我。
我缺少什么来解决这个问题?
请帮忙!谢谢!
【问题讨论】: