小编ren*_*ene的帖子

在远程计算机上运行 vbs 代码时没有错误

我希望这个 vbs 代码能在远程机器上执行 oShell.run 方法。情况似乎并非如此,但此脚本执行时没有显示错误。

on error resume next

dim oShell, strComputer, intProcessID

strComputer = InputBox("IP or Host Name:", "DELETER - serdaruzun@outlook.com")

set oShell = WScript.CreateObject("Wscript.shell") & strComputer

oShell.run "cmd.exe /C rd \\%PC%\Users\1*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\2*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\3*.* /s /q", null, null, intProcessID
set oShell = nothing
Run Code Online (Sandbox Code Playgroud)

在远程计算机上执行这些命令的正确方法是什么?

windows vbscript cmd.exe

-6
推荐指数
1
解决办法
835
查看次数

标签 统计

cmd.exe ×1

vbscript ×1

windows ×1