Link to home
Start Free TrialLog in
Avatar of elwayisgod
elwayisgodFlag for United States of America

asked on

Understanding VBS 'True' & 'False' parameters

Here's my two lines in code:

intErr = objShell.Run("cscript.exe ""D:\sample.vbs""", 0, True)
      
intErr = objShell.Run("D:\sample.bat", 0, False)

I was told the 'True' or 'False' is to tell it whether or not to finish the script before continuing on the 2nd one.  However on the first one, I was told it was to 'overwrite' the existing files if they exist.  Or am I misled.  I need to understand what differences are in the above.  I mainly need the first one to complete before it continues to the second one.
ASKER CERTIFIED SOLUTION
Avatar of Surone1
Surone1
Flag of Suriname image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of elwayisgod

ASKER

That's what I thought because how would it know what my 'sample.vbs' is performing anyways.

Thanks,
Avatar of Qlemo
See http://ss64.com/vb/run.html (for example) for reference. The last value of Shell.Run tells whether the call should wait for termination of the process.