I see Raven jumped in while I was busy typing and uploading screen shots to Photobucket... no matter [rolls eyes]
One question, what does //nologo mean?
Windows has two Visual Basic Script "script engines" that you can use to run scripts. They are Wscript.exe and Cscript.exe. Wscript.exe as you might guess, is Windows GUI oriented, and Cscript.exe is command line oriented.
Consider the following VBScript one-liner: (let's call it HelloWorld.vbs)
wscript.echo "Hello World"
If you run it with the Wscript engine by typing Wscript.exe HelloWorld.vbs at the prompt this is what you get:
With default settings if you run it with Cscript.exe at the prompt this is what you get:
The top 2 lines are the "logo" or "banner". If we are calling a vbscript from a batch using FOR we just want the output of the vbscript; the logo will screw things up so we can suppress it either by using the //nologo switch:
cscript //nologo HelloWorld.vbs
so all that happens is that "Hello World" gets echoed to the console. Just like "echo Hello World" in a batch
or change the default to "no logo" by typing:
cscript //nologo /S
at the prompt. This will be saved and become the default for all future sessions. You can change it back by typing
cscript //logo /S
Note that most cscript and wscript switches start with two slashes to distinguish them from switches to be passed to the script being run.