How can I run a file with VisualBasicScript (.vbs)?
The file is 'file.bat' and it's located in the same dir as the .vbs.
After the installation, launch Visual Studio, make sure that the JIT debugger is activated for "Script" (menu Tools > Options > Debugging > Just-In-Time). And then run the script using "C:\Windows\System32\cscript.exe" /x "My File. vbs" in the two flavors as explained in the other answers, that will start the debugger.
Click the Start button, and then click Run. In the Open field, type the full path of the script, and then click OK. You can also type WScript followed by the full name and path of the script you want to run.
yes i want to run it.
Then try this:
CreateObject("WScript.Shell").Run "file.bat"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With