Display VBS variable in command prompt

January 22, 2013 at 22:30:47
Specs: Windows 7
I would like to know how to display variable values in command prompt. Following is the vbs code:

For i=0 To 10
// I should display this variable value in command prompt

If I write Shell.run(a.bat) inside loop, this will open command prompt 10 times.
But i want all 10 values to be displayed in single command prompt.

See More: Display VBS variable in command prompt

Report •

January 22, 2013 at 22:43:44
Rather than trying to use a batch, you might want to use vbscript, if you just want to show a value:
for i=0 to 10
wscript.echo i
for i=0 to 10
wscript.stdout.writeline i
shell.run is massive overkill for what you want. No need to spawn another kernel process just to display a number.
(ps: use cscript, not wscript, to run the script)

Report •
Related Solutions

Ask Question