Avatar of elwayisgod
elwayisgod
Flag 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.
VB ScriptVisual Basic ClassicShell Scripting

Avatar of undefined
Last Comment
Qlemo

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Surone1

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
elwayisgod

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

Thanks,
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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23