Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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