我正在尝试将工作目录作为命名参数传递给 vbscript。系统通常扩展“.”。到当前路径,但是当我检查命名参数时,我只得到字符串“。”
这是命令行:
    cscript myscript.vbs /a:"first arg" /b:second /c:.
这是脚本:
    dim args : set args = wscript.arguments.named
    wscript.echo args.item("a")
    wscript.echo args.item("b")
    wscript.echo args.item("c")
这是输出:
    first arg
    second
    .