Board logo

标题: 请问vbs调用DOS命令 [打印本页]

作者: dllrose     时间: 2007-1-8 10:58    标题: 请问vbs调用DOS命令

dim wsh
set wsh=wscript.createobject("wscript.shell")
msgbox "请输入要关闭程序的PID"
int pid=inputbox("请输入PID","")
b="command /c -c q -p "&pid
wsh.run b
请问执行的时候为什么关闭不了指定程序?什么地方写错了呢?`
作者: jmz573515     时间: 2007-1-8 20:41
  代jmz573515发他修改后的代码:
set ws=createobject("wscript.shell")  
pid=inputbox("请输入要关闭程序的PID","")
if pid="" then wscript.quit
ws.run "ntsd -c q -p " & pid
[ Last edited by namejm on 2007-1-9 at 02:13 PM ]
作者: dllrose     时间: 2007-1-11 04:30
太感谢了``谢谢大家的热心`
作者: lkwater     时间: 2007-1-12 00:53
又学到一招了
作者: lkwater     时间: 2007-1-12 00:59
怎么我试过后关不了