现在的位置: 首页 > 综合 > 正文

命令行运行vbs脚本并传参数给vbs中的变量简单示例

2013年08月16日 ⁄ 综合 ⁄ 共 249字 ⁄ 字号 评论关闭
简单代码示例:

CommandLine:    path\cscript.exe  xxx.vbs helloworld

VBSCode:            Set args = WScript.Arguments
             If args.Count = 1 Then
 
     test= WScript.Arguments(0)
  
MsgBox "test  " & name
                             End If

Msgboxshow:       test   helloworld

抱歉!评论已关闭.