Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Launching VBS with CMD

242 views
Skip to first unread message

Frank P. Westlake

unread,
Jul 14, 2012, 9:37:12 AM7/14/12
to
After I spent hours creating a way to wrap a JScript script in a CMD
script so that no files need be created I posted that solution here and
was advised that the technique had already been published. That is
probably also true in this case, but here it is anyway.

A method of launching VBS without first writing an external file:

:: BEGIN SCRIPT ::::::::::::::::::::::::::::::::::::::
:' demo.cmd
:' From the desk of Frank P. Westlake, 2012-07-12
:' A hybrid CMD/VBS script
:' The first line has dual purpose:
:' VBS uses it to set the arguments
:' CMD uses it to launch this VBS script.
Set a=WScript.Arguments'&Set a=&CSCRIPT //NOLOGO //E:VBS "%~f0" %*
:wscript.echo("This is a VB script.")
:wscript.echo("All lines begin with colon.")
:: END SCRIPT ::::::::::::::::::::::::::::::::::::::::

Frank

jeb

unread,
Jul 14, 2012, 2:40:00 PM7/14/12
to
On 14 Jul., 15:37, "Frank P. Westlake" <frank.westl...@gmail.net>
wrote:
Nice, but to this point it's easy :-)

But how to avoid any output at startup?
How to activate @echo off before anything is printed ?

jeb

Todd Vargo

unread,
Jul 15, 2012, 6:51:45 PM7/15/12
to
I posted a similar trick some 12 years ago in amb/mpbd to launch qbasic
code with args (qbasic does not support an args function). Note, you
could add &GOTO :EOF to the end of your set command to eliminate the
need to prefix each line with a colon. Also, the "&Set a=" in the middle
of the line can be removed (or replaced with a &CLS for a cleaner display).

Basically, what you have here is merely a convoluted way to launch vbs
using a batch file extension. The :: commented lines cause WSH to fail
with a compilation error, lack of echo off ability makes it start up
sloppy, and since useful cmd/vbs hybrid ability is absent, I do not see
the excitement. Sorry.

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)


Liviu

unread,
Jul 15, 2012, 8:24:14 PM7/15/12
to
"jeb" <xi...@gmx.de> wrote...
> "Frank P. Westlake" <frank.westl...@gmail.net> wrote:
>> [...]
>> A method of launching VBS without first writing an external file
> [...]
> But how to avoid any output at startup?
> How to activate @echo off before anything is printed ?

::'^Z @echo off

Not pretty, and one's text editor needs to allow control chars
(the ^Z above is a literal Ctrl-Z, hex 0x1A, decimal 26), but
it was verified to work under a few different versions of cmd
from XP to Win7.

http://www.dostips.com/forum/viewtopic.php?p=13170#p13170
http://stackoverflow.com/questions/9074476/is-it-possible-to-embed-and-execute-vbscript-within-a-batch-file-without-using-a

Liviu




frank.w...@gmail.com

unread,
Jul 15, 2012, 7:40:29 AM7/15/12
to
From "Frank P. Westlake" :
>A method of launching VBS without first writing an
>external file:

Here's a better routine; the only thing dirty is that
"ECHO OFF" is printed to the console.

:' BEGIN SCRIPT ::::::::::::::::::::::::::::::::::::::
:' demo1.cmd
:' From the desk of Frank P. Westlake, 2012-07-15
:OFF=1:function ECHO(x):end function
ECHO OFF
ECHO 1'>NUL:&CSCRIPT //NOLOGO //E:VBS "%~f0" %*&Goto :EOF

' All VBS from here down.
wscript.echo("This is a VB script.")
' Simulate a very important job.
set a=wscript.arguments
n=a.count-1
if n>=0 then
wscript.echo("Arguments:")
for i=0 to n
wscript.echo("arg "&i&"="&a(i))
next
else wscript.echo "No arguments to print."
end if
' End of very important job simulation.
:' END SCRIPT ::::::::::::::::::::::::::::::::::::::::

There are three lines to add to the top of a VBS script:

:OFF=1:function ECHO(x):end function
ECHO OFF
ECHO 1'>NUL:&CSCRIPT //NOLOGO //E:VBS "%~f0" %*&Goto :EOF

The first line makes ECHO a VBS function that requires
one parameter, and it makes OFF a VBS variable which is
used as the argument for function ECHO.

VBS doesn't require parentheses for the arguement list
so the second line now has valid meaning both for CMD
and VBS.

The third line hides the CSCRIPT command from VBS with
the VBS comment character '; but this line must also be
acceptable to CMD so the dual purpose ECHO is used
again. From the redirection to NUL: to the end of the
line is a comment for VBS and valid instruction for CMD.

This particular demo script does not require that
anything be done in CMD so it could be saved as a VBS
file and called directly with CSCRIPT, but the procedure
allows for pre and post CMD processing all within a
single file. An example:

:' BEGIN SCRIPT ::::::::::::::::::::::::::::::::::::::
:' demo2.cmd
:' From the desk of Frank P. Westlake, 2012-07-15
:OFF=1:function ECHO(x):end function
ECHO OFF

:' Three lines for CMD;
ECHO 1'>NUL:&Set /P "password=Enter your password: "
ECHO 1'>NUL:&Echo CMD: password=%password%
ECHO 1'>NUL:&CSCRIPT //NOLOGO //E:VBS "%~f0" %password%&Goto :'Post

' All VBS from here to :'Post.
' Set and print the password.
set a=wscript.arguments
if a.count>0 then
password=a(0)
wscript.echo "VBS: password="&password
else wscript.echo "VBS: password given."
end if

:'Post
:' All this for CMD:
ECHO 1'>NUL:&Echo CMD: clearing password...
ECHO 1'>NUL:&Set "password="
ECHO 1'>NUL:&Set "password"
ECHO 1'>NUL:&Goto :EOF
:' END SCRIPT ::::::::::::::::::::::::::::::::::::::::

The Post routine could immediately follow the call to
CSCRIPT and Goto :'Post would not be necessary, but I
wanted to show how to use the label.

I don't have offline documentation for VBS so I can't
figure out how to bypass the '@' invalid character
problem that prevents hiding ECHO OFF.

Frank

frank.w...@gmail.com

unread,
Jul 16, 2012, 6:51:07 PM7/16/12
to
From "Liviu" :

>::'^Z @echo off

Very good. Better:

:'^Z@echo off

In Notepad++ the key combination is [CTRL-SHIFT-Z].

Frank

jeb

unread,
Jul 17, 2012, 7:42:03 AM7/17/12
to
Am Dienstag, 17. Juli 2012 00:51:07 UTC+2 schrieb Frank Westlake:
> From &quot;Liviu&quot; :
>
> &gt;::&#39;^Z @echo off
>
> Very good. Better:
>
> :&#39;^Z@echo off
>
> In Notepad++ the key combination is [CTRL-SHIFT-Z].
>
> Frank

If @ is anywhere a legal character in VBS, it could be possible to create a "perfect" solution, not echoing even the "ECHO OFF" command.

Or if there exists a multiline comment in VBScript like in batch it could be possible

:'Makes the next line only visible for VBScript ^
a=1+2+4_
<1' echo off <nul

Then you could create something like:
:???? Makes the next line only visible for batch'_
@echo off

jeb

Tom Lavedas

unread,
Jul 17, 2012, 9:17:58 AM7/17/12
to
The @ is used in JScript, but not VBS.

Also, there is no multi-line comment in VBS. That's been the problem
with single file hybrids all along.

I published a hybrid JScript/batch approach here some years ago
(didn't stop to look it up). Here is an example to how that works ...

@if (@X)==(@Y) @goto :Dummy @end/* JScript comment starts
::Batch part starts
@echo off
setlocal
for /f "delims=" %%I in (
'cscript //nologo //e:jscript "%~f0" 500'
) do set "Output=%%I"
echo Output of script is %Output%
exit /b
:: Batch part ends

JScript comment ends */
// Jscript part starts
var net=new ActiveXObject('WScript.Network');
var un=net.username
if (WSH.Arguments.Length!=0){WSH.Sleep(WSH.Arguments(0))};
WSH.Echo("Username is "+un)
// Jscript part ends

I believe there is a way to get the JScript to execute VBScript code,
but I don't have it worked out and it's off-topic for a batch oriented
newsgroup, I think.
_____________________________
Tom Lavedas

Liviu

unread,
Jul 17, 2012, 12:19:33 PM7/17/12
to
"Todd Vargo" <tlv...@sbcglobal.netz> wrote...
>
> Basically, what you have here is merely a convoluted way to launch vbs
> using a batch file extension. The :: commented lines cause WSH to fail
> with a compilation error, lack of echo off ability makes it start up
> sloppy, and since useful cmd/vbs hybrid ability is absent, I do not
> see the excitement. Sorry.

FWIW the :: lines don't trigger any error here (xp sp3). As far as
usefulness, the technique has the advantage of allowing the script
itself to choose its host (cscript vs. wscript) and runtime options
(such as timeout), which is not possible with a standalone vbs file.

One limitation however is that the cmd wrapper restricts the code
to plain 8-bit text, while the script engines support 16-bit unicode
vbs/js sources - which may matter if one needs to use characters
outside the current codepage.

Liviu


Todd Vargo

unread,
Jul 17, 2012, 6:05:17 PM7/17/12
to
I am using XP pro sp3. Copy his original demo.cmd, including his ::
comments. Here is the output that you should be seeing.

Z:\>demo hello world

Z:\>Set a=WScript.Arguments' & Set a= & CSCRIPT //NOLOGO //E:VBS
"Z:\demo.cmd"
hello world
Z:\demo.cmd(11, 4) Microsoft VBScript compilation error: Expected statement

Line 11 corresponds to the :: END SCRIPT line. Correcting the problem is
as easy as inserting a ' after the :: to force WSH to ignore the
comments also.

Liviu

unread,
Jul 17, 2012, 7:20:15 PM7/17/12
to
"Todd Vargo" <tlv...@sbcglobal.netz> wrote...
>
> Copy his original demo.cmd, including his :: comments.

That explains it, thanks. I did not have those begin/end lines copied
down, and I don't think Frank meant them as part of the script itself.

Liviu


Todd Vargo

unread,
Jul 17, 2012, 9:31:34 PM7/17/12
to
Back in the pre @ days, we used a CLS to clean up the ECHO OFF.
Likewise, you could insert an "&CLS" to the next line before asking for
a password (or whatever the next line will be).

Of course, if you create a large file using this format, you will
quickly see that adding the "ECHO 1'>NUL:&" to each batch line is more
cumbersome than just creating a temporary vbs file in the already
available TEMP folder.

Besides being an intellectual exercise, remind me again why anyone would
want to go to such lengths to avoid TEMP files?

frank.w...@gmail.com

unread,
Jul 18, 2012, 6:52:58 AM7/18/12
to
From Tom Lavedas :
>I believe there is a way to get the JScript to execute
>VBScript code,
>but I don't have it worked out and it's off-topic for a
>batch oriented
>newsgroup, I think.

I thought there might be such a solution; if you do work
it out please post it. I had a VBS/Jscript CHM on a
previous computer and haven't yet found one to download
to my present Windows laptop. But the CTRL-Z trick seems
to be the best so I will probably use it.

I think detailed discussions of VBS and JScript are
improper but discussions of how to do anything with CMD
are proper.

Frank

frank.w...@gmail.com

unread,
Jul 18, 2012, 7:06:00 AM7/18/12
to
From "Liviu" :
>One limitation however is that the cmd wrapper restricts
>the code
>to plain 8-bit text, while the script engines support
>16-bit unicode
>vbs/js sources - which may matter if one needs to use
>characters
>outside the current codepage.

UTF-8 could be used instead.

Frank

Tom Lavedas

unread,
Jul 18, 2012, 9:11:46 AM7/18/12
to
The WSH Docs CHM is still available here (URL on one line):
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=2764

The VBScript solution I found runs under an IE host, so you can't do a
lot of the more interesting stuff; like opening a file or use the
intrinsic WSH functions, like Sleep; but it does interpret simple VBS
expressions ...

@if (@X)==(@Y) @goto :Dummy @end/* JScript comment starts
::Batch part starts
@echo off
setlocal
for /f "delims=" %%I in (
'cscript //nologo //e:jscript "%~f0" '
) do set "Output=%%I"
echo Output of script is %Output%
exit /b
:: Batch part ends

**VBS** 'VBScript starts
pi=round(atn(1)*4,7) ' just a simple example
out=pi
' VBScript ends **VBS**

JScript comment ends */
// Jscript part starts
var fso=new ActiveXObject('Scripting.FileSystemObject');
var s=fso.OpenTextFile(WSH.ScriptFullName,1).ReadAll();
var html=new ActiveXObject('htmlfile');
html.write('<script language=vbs>'+
s.split('**VBS**')[1]+'</script>');
WSH.Echo(html.parentWindow.out)
// Jscript part ends

The VBS code must be enclosed by the sting **VBS**. The JScript code
doesn't need to be altered, unless input arguments are required.
Multiple output arguments need to be concatenated in the VBS part, so
there is one output string with command processor delimiters. The
batch code would need to be altered to accommodate these.

As Todd questioned - I'm not certain this is anything more than an
intellectual exercise - it does seem to be a lot of effort just to
avoid using a temp file.
_____________________________
Tom Lavedas

foxidrive

unread,
Jul 18, 2012, 9:26:06 AM7/18/12
to
On Wednesday 18/07/2012 20:52, frank.w...@gmail.com wrote:
> From Tom Lavedas :
>> I believe there is a way to get the JScript to execute
>> VBScript code,

> I thought there might be such a solution; if you do work
> it out please post it. I had a VBS/Jscript CHM on a
> previous computer and haven't yet found one to download
> to my present Windows laptop.

I think this is the one.

http://www.google.com/search?&q=Windows%20Script%20V5.6%20Documentation.chm&sourceid=firefox



--
Mic


foxidrive

unread,
Jul 18, 2012, 9:38:11 AM7/18/12
to
On Wednesday 18/07/2012 23:11, Tom Lavedas wrote:

> As Todd questioned - I'm not certain this is anything more than an
> intellectual exercise - it does seem to be a lot of effort just to
> avoid using a temp file.

Funnily enough, in a lot of requests for help the people don't like temp files. I don't understand why, as Windows uses temp files by the gigaload and people using MSDOS any version for scripting were always using temp files.
It's not as though creating a small temp file and deleting it later is going to take any appreciable amount of time.

While it is an intellectual exercise, I do think that the simpler scripting layout a batch file is, the better.
There are such convoluted batch files and workarounds that even the script writers themselves have trouble deciphering what they wrote, 3 years later.



--
Mic


Tom Lavedas

unread,
Jul 18, 2012, 11:22:17 AM7/18/12
to
On Jul 18, 9:11 am, Tom Lavedas <tglba...@verizon.net> wrote:
> On Jul 18, 6:52 am, frank.westl...@gmail.com wrote:
>
>
>
>
>
> > From Tom Lavedas :
>
> > >I believe there is a way to get the JScript to execute
> > >VBScript code,
> > >but I don't have it worked out and it's off-topic for a
> > >batch oriented
> > >newsgroup, I think.
>
> > I thought there might be such a solution; if you do work
> > it out please post it. I had a VBS/Jscript CHM on a
> > previous computer and haven't yet found one to download
> > to my present Windows laptop. But the CTRL-Z trick seems
> > to be the best so I will probably use it.
>
> > I think detailed discussions of VBS and JScript are
> > improper but discussions of how to do anything with CMD
> > are proper.
>
> > Frank
>
> The WSH Docs CHM is still available here (URL on one line):http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=2764
>
> The VBScript solution I found runs under an IE host, so you can't do a
> lot of the more interesting stuff; like opening a file or use the
> intrinsic WSH functions, like Sleep; but it does interpret simple VBS
> expressions ...
{snip}
> _____________________________
> Tom Lavedas- Hide quoted text -
>

OK, here is an alteration that passes all input arguments from the
JScript command line into the VBScript. It also passes the WSH, fso
and WScript.Network objects so they are avalable to the VBS code as
globals. The VBS code is full of bells and whistles as examples and
to illustrate this latest version's versatility. It could be much
simpler than this ...

@if (@X)==(@Y) @goto :Dummy @end/* JScript comment starts
::Batch part starts
@echo off
setlocal
for /f "delims=" %%I in (
'cscript //nologo //e:jscript "%~f0" 10 0'
) do call :Sub %%I
exit /b

:Sub
:: Just an example of processing output from VBScript
echo Output of script is %1
if not [%2]==[] shift & goto :Sub
goto :eof

:: Batch part ends

**VBS** 'VBScript starts
function RunVBS(input)
pi=round(atn(1)*4,input(0))
wsh.sleep input(1)
wsh.echo "Testing"
con.writeline "--------Direct Output to console--------"
wsh.stderr.writeline string(50,"*")&vbcrlf _
&"ERROR OUTPUT"&vbcrlf&string(50,"*")
RunVBS=net.username & ", " & pi
end function
' VBScript ends **VBS**

JScript comment ends */
// Jscript part starts
var fso=new ActiveXObject('Scripting.FileSystemObject');
var s=fso.OpenTextFile(WSH.ScriptFullName,1).ReadAll();
with (new ActiveXObject('htmlfile')){
write('<script language=vbs>DIM wsh,fso,net,con\n'+
s.split('**VBS**')[1]+'</script>');
parentWindow.wsh = WSH; parentWindow.fso = fso;
parentWindow.con = fso.OpenTextFile('CON:',2);
parentWindow.net = new ActiveXObject('wscript.network');
WSH.Echo(parentWindow.RunVBS(WSH.arguments))}
// Jscript part ends

Any other objects that are marked as 'unsafe for scripting' can be
instantiated in the JScript part and passed into the VBS part by
adding there declaration to the DIM statement and a statement added to
pass it into the 'parentWindow' as illustrated for the console (con)
and network (net) objects.

BTW, the two arguments in the example change the number of decimal
places for the value of PI and set a delay in milliseconds. Play with
the values on the Cscript line to see their effects.
___________________________
Tom Lavedas

Liviu

unread,
Jul 18, 2012, 12:40:36 PM7/18/12
to
<frank.w...@gmail.com> wrote...
> From "Liviu" :
>>One limitation however is that the cmd wrapper restricts
>>the code to plain 8-bit text, while the script engines support
>>16-bit unicode vbs/js sources
>
> UTF-8 could be used instead.

Interesting thought, unfortunately the script engines don't seem
to support UTF-8 vbs files.

Liviu



Todd Vargo

unread,
Jul 18, 2012, 5:15:33 PM7/18/12
to
Agreed. Occasionally we find someone posting a really old snippet of
convoluted MSDOS batch code asking how to modify it to suit their newer
system/needs. Of course, it's usually the original author that remembers
their own handy work that goes back to find the original discussion to
recall why the code was written that way.

Personally, if someone is specifying unrealistic requirements, ie. no
temp files or 3rd party utilities, I prefer to ignore the request unless
it appears to be homework in which case I may chime in.

Liviu

unread,
Jul 18, 2012, 8:08:21 PM7/18/12
to
"foxidrive" <foxi...@gotcha.woohoo.invalid> wrote...
>
> Funnily enough, in a lot of requests for help the people don't like
> temp files. I don't understand why, as Windows uses temp files by
> the gigaload and people using MSDOS any version for scripting were
> always using temp files. It's not as though creating a small temp file
> and deleting it later is going to take any appreciable amount of time.

IMHO the "don't like" part is understandable, as long as it's not
tabooed into a "never use" dogma.

Batch language itself is minimalistic, and so tend to be many of its
users. So, if it can be (reasonably) done without a temp file, then why
not. That way there is no need to worry about deleting the temp file,
leaving it behind in case of errors, or generating unique names in cases
where the code is recursive or can potentially be run concurrently e.g.
when the function using a temp file is part of a general purpose utility
called from other batch files.

Liviu


foxidrive

unread,
Jul 19, 2012, 5:26:14 AM7/19/12
to
On Thursday 19/07/2012 10:08, Liviu wrote:
> "foxidrive" <foxi...@gotcha.woohoo.invalid> wrote...
>>
>> Funnily enough, in a lot of requests for help the people don't like
>> temp files. I don't understand why, as Windows uses temp files by
>> the gigaload and people using MSDOS any version for scripting were
>> always using temp files. It's not as though creating a small temp file
>> and deleting it later is going to take any appreciable amount of time.
>
> IMHO the "don't like" part is understandable, as long as it's not
> tabooed into a "never use" dogma.

Yes, and maybe that is where it is trending.

> Batch language itself is minimalistic, and so tend to be many of its
> users. So, if it can be (reasonably) done without a temp file, then why
> not. That way there is no need to worry about deleting the temp file,

That's fair, though it often takes a good deal of thought and subterfuge to eliminate all temp files.

> leaving it behind in case of errors, or generating unique names in cases
> where the code is recursive or can potentially be run concurrently e.g.
> when the function using a temp file is part of a general purpose utility
> called from other batch files.

I agree too, although it's only 3 lines to generate random filenames.


Todd Wrote:

> Personally, if someone is specifying unrealistic requirements, ie. no
> temp files or 3rd party utilities, I prefer to ignore the request unless
> it appears to be homework in which case I may chime in.

That's how I feel: if the task can be done easily with the appropriate tool then it's madness to ask for pages of batch code (for free) to achieve the same thing.


--
Mic

frank.w...@gmail.com

unread,
Jul 19, 2012, 9:32:56 AM7/19/12
to
From Tom Lavedas :
>The WSH Docs CHM is still available here (URL on one
>line):
>http://www.microsoft.com/download/en/details.aspx?displa
>lang=en&id=2764

Thank you very much.

I'll have to save your message and study your script
next week.

Frank

Dr J R Stockton

unread,
Jul 19, 2012, 1:54:01 PM7/19/12
to
In alt.msdos.batch.nt message <13899cbb1f2$frank.w...@gmail.com>,
Wed, 18 Jul 2012 10:52:58, frank.w...@gmail.com posted:
Are you all aware of .wsf files as in
<http://en.wikipedia.org/wiki/Windows_Script_File> and of course in
<http://wsh2.uw.hu/index.html> ?

Discussing Windows Scripting without knowing what is in the latter is a
waste of time.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk DOS 3.3 6.20 ; WinXP.
Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
PAS EXE TXT ZIP via <http://www.merlyn.demon.co.uk/programs/00index.htm>
My DOS <http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.

Frank P. Westlake

unread,
Jul 20, 2012, 9:46:14 AM7/20/12
to
On 2012-07-19 10:54, Dr J R Stockton wrote:

> Are you all aware of .wsf files as in
> <http://en.wikipedia.org/wiki/Windows_Script_File> and of course in
> <http://wsh2.uw.hu/index.html> ?
>
> Discussing Windows Scripting without knowing what is in the latter is a
> waste of time.

It seems to me that in to be qualified to make such a statement you must
know what is in the latter reference. Please give me a very basic
example of a CMD script file which launches itself as Windows Script
with CSCRIPT.EXE.

Frank

Dr J R Stockton

unread,
Jul 21, 2012, 1:46:03 PM7/21/12
to
In alt.msdos.batch.nt message <jubnfk$i78$1...@news.albasani.net>, Fri, 20
Jul 2012 06:46:14, Frank P. Westlake <frank.w...@gmail.com> posted:
I have read the reference and I have used it.
St Luke: Chapter 10, Verse 37, tail.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike 6.05 WinXP.
Web <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links.
Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.

Frank P. Westlake

unread,
Jul 23, 2012, 11:23:20 AM7/23/12
to
On 2012-07-21 10:46, Dr J R Stockton wrote:
>> Please give me a very basic
>> example of a CMD script file which launches itself as Windows Script
>> with CSCRIPT.EXE.
>
>
> I have read the reference and I have used it.
> St Luke: Chapter 10, Verse 37, tail.

I don't understand the relevance. This discussion (Subject: Launching
VBS with CMD) has been about launching VBS with CMD in a single hybrid
script; launching VBS with CMD via JScript was relevant. It seems to me
that it is probably not possible to use a single script which will run
as both CMD and Windows Script and I hoped you could provide an example.

Frank

Todd Vargo

unread,
Jul 23, 2012, 4:26:30 PM7/23/12
to Frank P. Westlake
Frank, the discussion started out that way but morphed when Tom posted
"I believe there is a way to get the JScript to execute VBScript
code..." so JRS mentioned the use of .wsf files, which seems to be a
disconnect form the original discussion.

That is just how I read it, YMMV.

Todd Vargo

unread,
Jul 23, 2012, 4:26:55 PM7/23/12
to
On 7/23/2012 11:23 AM, Frank P. Westlake wrote:
Frank, the discussion started out that way but morphed when Tom posted
"I believe there is a way to get the JScript to execute VBScript

frank.w...@gmail.com

unread,
Jul 24, 2012, 6:30:06 AM7/24/12
to
From Todd Vargo :
>> I don't understand the relevance. This discussion
>(Subject: Launching
>> VBS with CMD) has been about launching VBS with CMD in
>a single hybrid
>> script; launching VBS with CMD via JScript was
>relevant.

>Frank, the discussion started out that way but morphed
>when Tom posted "I believe there is a way to get the
>JScript to execute VBScript code..."

Thanks Todd, but I was accounting for that where I said
"launching VBS with CMD via JScript was relevant". That
can still be done with a single script, and 'single
script' has been the basic ingredient of this
discussion.

A Windows Script script might be useful if it could also
launch script into CMD, but then it wouldn't be a CMD
script and the discussion should be elsewhere.

Frank
0 new messages