VBScript中嵌入Windows批处理文件中 [英] Embed VBScript inside Windows batch file
本文介绍了VBScript中嵌入Windows批处理文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能在批处理文件中嵌入的VBScript?
Is it possible to embed VBScript within a batch file?
我现在有使用调用一个.VBS文件.cmd文件
I currently have a .CMD file that calls a .VBS file using
cscript //NoLogo MyScript.vbs
但我preFER分配只是一个单一的.cmd文件。
but I'd prefer to distribute just a single .CMD file.
推荐答案
<一个href=\"http://www.computerhope.com/forum/index.php?topic=103686.0\">http://www.computerhope.com/forum/index.php?topic=103686.0
@echo off
echo This is batch
:wscript.echo "This VBScript"
:wscript.echo "Today is " & day(date) & "-" & month(date) & "-" & year(date)
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs
echo This is batch again
这篇关于VBScript中嵌入Windows批处理文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文