Solved

VBScript to run Batch File

Posted on 2008-10-23
3
571 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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