How to run .bat file in vb

Status
Not open for further replies.

[A]bu

Journeyman
open a file in output mode having extension .bat. Now type codes...
just then use shell cmd in vb and locate the path
 

redhat

Mad and Furious
Do you want to execute a batch file????

Then use this:
Code:
Dim RetVal
RetVal = Shell("C:\mybatch.bat", 1)

The general syntax to use this is :
Code:
RetVal = Shell([Pathname of EXE],[WindowStyle As vbAppWinStyle = vbMinimisedFocus])
 
Status
Not open for further replies.
Top Bottom