通过wscript.shell将两个参数传递给cmd可以使用以下步骤:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd /c command arg1 arg2", 1, True
其中,command是要执行的命令,arg1和arg2是要传递的两个参数。
完整的示例代码如下:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd /c command arg1 arg2", 1, True
这样就可以通过wscript.shell将两个参数传递给cmd了。
注意:上述代码是使用VBScript语言编写的,需要保存为.vbs文件并在Windows系统上运行。
没有搜到相关的文章