
CODE: [Copy to clipboard]@echo off
>test.vbs echo set File=WScript.Arguments
>>test.vbs echo WScript.echo "传递参数",File.Count,"个"
>>test.vbs echo WScript.echo "第一个参数",File(0)
>>test.vbs echo WScript.echo "第二个参数",File(1)
set xxx=abc
set xxxxxx=efg
test.vbs %xxx% %xxxxxx%
pause
CODE: [Copy to clipboard]>test.vbs echo WScript.echo "参数"
for /f "delims=" %%i in ('"cscript //nologo test.vbs"') do echo %%i
pause
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |