'获取参数并生成BAT文件并运行 By 依梦琴瑶On Error Resume NextDim Fso, ScriptName, ScriptFullPath, BatFileSet Fso=CreateObject("Scripting.FileSystemObject")ScriptName = Fso.GetFileName(Wscript.ScriptFullName)If WScript.Arguments.Count=0 Then MsgBox "请带参数后执行。" & vbcrlf & vbcrlf &_ "使用方法:" & vbcrlf &_ " " & ScriptName & " 参数" & vbcrlf & vbcrlf &_ " 参数若有空格,请加上英文双引号。" & vbcrlf &_ "",48,"用法 By 依梦琴瑶" Wscript.QuitEnd IfScriptPath = Fso.GetFile(Wscript.ScriptFullName).ParentFolderBatFile = ScriptPath & "\参数.bat"Fso.CreateTextFile(BatFile).Write "@echo off & title 开始执行""%~nx0"" By 依梦琴瑶" & vbcrlf &_ WScript.Arguments(0) & " 111" & vbcrlf &_ WScript.Arguments(0) & " 222" & vbcrlf &_ WScript.Arguments(0) & " 333" & vbcrlf &_ WScript.Arguments(0) & " 444" & vbcrlf &_ "del /f /q ""%~0"""CreateObject("WScript.Shell").Run """" & BatFile & """",1,False