Execute a script from a .bat file

To run a script from a .bat file, you first have to create that .bat file.

Then, paste this code in the bat file:

@echo off
wscript "C:\Users\Thomas\Desktop\test\print.vbs"
pause

the @echo off will prevent the printing of commands.

I added the pause command; so you have to manually press a key to exit the output window. Feel free to remove this line.

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

Leave a Reply

Your email address will not be published. Required fields are marked *