I have a vbs script file that I am running on a command line. Is there anyway to return a success or failure of vbscript back to the calling command line.
For example, suppose the following is my vbs file.
test.vbs
---------
msgbox("hello"
xyz
---------
This script will cause an error on line xyz, b/c this is not valid vbscript syntax or command. If I run this vbs script from the command line c:\>test.vbs I notice several things.
1) The scripts starts and a hello msgbox is displayed
2) Almost instantly, a new blank command line is ready c:\>
3) The msgbox is still displaying, so I believe the script is still in execution mode
4) I click on the OK button and WSH error appears
Here is what I would like, ( if possible )
1) Execute script c:\>test.vbs
2) Command Line holds until script is finished, HOW???
3) Msgbox is displayed, life is good, click ok
4) New command line is ready for input
Any ideas?????
For example, suppose the following is my vbs file.
test.vbs
---------
msgbox("hello"
xyz
---------
This script will cause an error on line xyz, b/c this is not valid vbscript syntax or command. If I run this vbs script from the command line c:\>test.vbs I notice several things.
1) The scripts starts and a hello msgbox is displayed
2) Almost instantly, a new blank command line is ready c:\>
3) The msgbox is still displaying, so I believe the script is still in execution mode
4) I click on the OK button and WSH error appears
Here is what I would like, ( if possible )
1) Execute script c:\>test.vbs
2) Command Line holds until script is finished, HOW???
3) Msgbox is displayed, life is good, click ok
4) New command line is ready for input
Any ideas?????