【问题标题】:Can't schedule a VBScript in scheduler无法在调度程序中调度 VBScript
【发布时间】:2012-12-13 04:53:42
【问题描述】:

我有一个 wsf 文件,我将在下面粘贴它,我试图在 Windows Server 任务计划程序中安排它。

如果我尝试手动执行 wsf 运行良好,但任务调度程序不会运行它。在我观看的过程中,我可以看到任务状态切换到“正在运行”,并且在大约 10 秒后(挂起的任务终止设置为 1 小时)切换回来。我没有看到在后台运行(我不知道是否应该),并且它运行的脚本(远程登录到另一台服务器并执行命令)尚未执行。

我确定这是一个愚蠢的权限问题,但经过几周的谷歌搜索和提问后,我无法弄清楚。

下面是脚本,以防它做的任何事情有帮助。

<job>
<script language="VBScript">
Option Explicit
On Error Resume Next
Dim oShell
Set oShell = CreateObject("WScript.Shell")
oShell.Run ("Telnet")
WScript.Sleep 1000
oShell.SendKeys("Open 172.16.8.9")
WScript.Sleep 1000
oShell.SendKeys("{Enter}")
WScript.Sleep 1000
oShell.SendKeys"csmmgr"
WScript.Sleep 1000
oShell.SendKeys("{Enter}")
WScript.Sleep 1000
oShell.SendKeys("quality")
WScript.Sleep 1000
oShell.SendKeys("{Enter}")
WScript.Sleep 1000
oShell.SendKeys "@dsm nyf/vol=nyf/data=""100"" JOB{^}ZLEGDWPJ"
WScript.Sleep 1000
oShell.SendKeys("{Enter}")
WScript.Sleep 1000
oShell.SendKeys "lo"
WScript.Sleep 1000
oShell.SendKeys("{Enter}")
oShell.sendkeys"^]"
WScript.Sleep 1000
oShell.SendKeys "q {Enter}"
</script>
</job>

--sw

【问题讨论】:

  • “系统管理员”与具有系统管理员权限的用户不同吗?

标签: windows scheduled-tasks scheduler


【解决方案1】:

在任务选项卡上将其设置为以系统管理员身份运行。您必须按设置密码按钮保存密码。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-09-21
    • 2014-12-22
    • 1970-01-01
    • 2023-04-04
    • 2016-07-23
    • 2012-05-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多