在vbs下执行cmd命令,并参数化cmd中的一些变量
类似以下代码,如何用vbs中的变量来代替C:\,以此来进入变量指示的目录
请大家说的详细些,谢谢!
set winshell = wscript.createobject ("wscript.shell")
winshell.run "cmd /K cd C:\"
set winshell = nothing
[解决办法]
dir = "C:\"
set winshell = wscript.createobject ("wscript.shell")
winshell.run "cmd /K cd " & dir
set winshell = nothing