Monday, April 4, 2011

Running Batch File As VB Script



1.Open Notepad.
2.Type
Set objShell = CreateObject("WScript.Shell")
strCommand = "C:\yourfile.bat"
objShell.Run strCommand, vbHide, TRUE

Note:Replace the ‘C:\ yourfile.bat’ with the actual name of the batch file that you have created, along with the location and then save this file with a .vbs extension. Now you may execute this VBScript file to run the batch file too, so there is no need for you to execute the batch file separately. Now the batch was still running in the background and remains hidden.
The only way to end the process is to open the task manager and end the process  WScript.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews