Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute cmd command from VBScript

Tags:

cmd

vbscript

How I can Execute a cmd command from VBScript (not by .bat file)

For example, I want to execute the following from VBScript:

cd /d C:dir_test\file_test 
sanity_check_env.bat arg1
like image 310
jon Avatar asked Mar 29 '11 04:03

jon


1 Answers

Create WScript.Shell object and invoke Run() method on it.

http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.85).aspx

like image 132
Naraen Avatar answered Oct 19 '22 14:10

Naraen