Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Echo without wait

Status
Not open for further replies.

MCubitt

Programmer
Mar 14, 2002
1,081
GB
I am using echo to output information to the user. Using cscript <script.name> from DOS I can receive the messages in a DOS-type window and there is no need for the user to click OK per message. The DOS-type window is nice because it shows the progress of the script.

Is this possible to do within the VB script? I do not partocularly want to have two files to hang about.

Thanks
 
Hello MCubitt,

Yes, but you made the right choice. Just some detail. It is the same vbscript, so it is not the &quot;Is this possible to do within the VB script&quot;, but a choice of the host, viz, cscript or wscript.

Now, in case you have to initiate the vbs from wscript, you have two choices:

[1] Add a couple of code lines in front of the original vbs to enfore a cscript hosting once wscript is detected as a host. (This we had dealt with it not too distance in the past here, I had participated in the thread---but, the technique is &quot;well-known&quot; and I claim nothing original.)

[2] The other choise is to initiate the wscript with //B (batch mode)
Code:
    wscript scriptname.extension //B [options...] [arguments]
This will make all messaging suppressed and no interactive with users allowed. This is well suited for a certain type of tasks. The only detail to take care is to initiate the //B which is not usually the default action. To do so, you can use a classic .bat file to launch the vbs or change the file association for certain users whereby //B action is taken as default action.

regards - tsuji
 
tsuji, thanks.. I found the thread: thread329-657045 it works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top