Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a .vbs from a .bat

Created an extensive batch script program to handle some automated file management and printing and I need to call a vbs file for its sendkeys operation. Is there a way to accomplish this without freezing the program?

I've tried START /WAIT my.vbs and the script freezes when it enters the .vbs

Anyone have other methods or switches you would recommend?

I would like it to run silently if at all possible, and i need the /WAIT switch because I need the sendkeys operation to complete prior to the next step in the batch file.

like image 300
Anthony Miller Avatar asked Feb 25 '23 00:02

Anthony Miller


1 Answers

Instead of using START /WAIT my.vbs you could try using cscript //NoLogo //B my.vbs. You can also pass other options to cscript that way.

like image 130
wimh Avatar answered Mar 08 '23 16:03

wimh