Reputation: 1298
I've written a small Python script to test my Visual Basic scripts function correctly before deploying them -
import subprocess
subprocess.call("cmd /c MyScript.vbs")
Rather than running the Visual Basic script, my script opens in Sublime Text (the default program).
How can I run the scripts rather than Opening them?
Upvotes: 0
Views: 155
Reputation: 10107
Use one of these, cscript is more appropriate for a console application.
subprocess.call("cmd /c wscript MyScript.vbs")
or
subprocess.call("cmd /c cscript MyScript.vbs")
An excellent answer as to what the difference is can be found here: Difference between wscript and cscript
Upvotes: 2