views:

22

answers:

1

Is it possible to embed VBScript within a batch file?

I currently have a .CMD file that calls a .VBS file using

cscript //NoLogo MyScript.vbs

but I'd prefer to distribute just a single .CMD file.

A: 

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
jnpcl
Yep, found that.
emddudley
Google works rather well, eh?
jnpcl