0

我写了一个小脚本如下:

Dim CMD
Set WshShell = WScript.CreateObject("WScript.Shell") 
CMD = Wscript.Arguments(0)
WshShell.Run CMD

现在我想调用这个脚本并传递一个参数,如下所示:

I:\VbScript.vbs \\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f="\\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT"

请您告知我该怎么做,因为参数调用中的这个引号引起了问题。

4

2 回答 2

0

双引号应该起作用:

I:\VbScript.vbs "\\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f="\\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT""

于 2012-09-20T10:54:12.493 回答
0
cscript.exe I:\VbScript.vbs "\\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f=\\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT"

cscript.exe I:\VbScript.vbs "\svaaoffprg2\ODrive\pros_groups\GRMS\GmLoad5.exe/f=", "\Svaakntnas537\BODI\Data Files\ACC\PROS_LOAD\G5\Staging\VSGPNR120918.DAT"

试试这个它对我有用。

于 2013-02-21T17:15:33.890 回答