• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 597
  • Last Modified:

VBScript to run Batch File

How can I create a VB Script to run a batch file located in the following path:

C:\Test Directory\test.bat.
0
georgedschneider
Asked:
georgedschneider
  • 2
2 Solutions
 
exx1976Commented:
Set oShell = CreateObject("Wscript.Shell")
oShell.Run("""c:\test directory\test.bat""")

0
 
georgedschneiderAuthor Commented:
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
 
exx1976Commented:
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now