lovechillcool
lovechillcool

Reputation: 762

Batch File Run VBScript

I am a newbie in the programming. I am wondering what the difference is between below two method of kicking off a VBScript. Both of them work on my machine.

call "C:\script.vbs"

cscript "C:\script.vbs"

Upvotes: 2

Views: 4663

Answers (1)

Frank Zhang
Frank Zhang

Reputation: 509

Usually, people compare cscript with wscript, the difference is explained here:

Difference between wscript and cscript

"Call" calls one batch program from another without stopping the parent batch program.

https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/call.mspx?mfr=true

CALL command vs. START with /WAIT option

In Windows, if you are running an automated program written in several batch scripts, you'll want to use "call".

Upvotes: 2

Related Questions