Solved

VBScript to run Batch File

Posted on 2008-10-23
3
588 Views
Last Modified: 2008-10-23
How can I create a VB Script to run a batch file located in the following path:

C:\Test Directory\test.bat.
0
Comment
Question by:georgedschneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
exx1976 earned 500 total points
ID: 22787146
Set oShell = CreateObject("Wscript.Shell")
oShell.Run("""c:\test directory\test.bat""")

0
 

Author Comment

by:georgedschneider
ID: 22787350
That worked perfectly.  Is there anyway to hide or minimize the batch script display?

Is there a way to minimize or hide the batch script?
0
 
LVL 18

Assisted Solution

by:exx1976
exx1976 earned 500 total points
ID: 22787383
All the parameters for the run method can be found here:


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

There's like a dozen different options for window display.
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question