Instead of a batch file you can just pass the DOS commands directly. Then output the results to a file.
Its not that hard.

This example will pass the DIR command, enter C:\, and output the directory listing to the file C:\Dir.txt
The /K switch is to keep the DOS window open but you can change it to the /C to close it. Also, SW_HIDE to make
it totally transparent to the user.

VB Code:
  1. Option Explicit
  2.  
  3. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
  4. ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  5.  
  6. Private Const SW_HIDE As Long = 0
  7. Private Const SW_SHOWNORMAL As Long = 1
  8.  
  9. Private Sub Command1_Click()
  10.     ShellExecute Me.hwnd, "Open", "C:\Windows\System32\CMD.exe", " /K Dir C:\  > C:\Dir.txt", "C:\", SW_SHOWNORMAL
  11. End Sub
Note: you would want to use the GetSystemDirectory API to dynamically get the directory where the CMD.EXE program is located.