hi
How to run Bat file in VB.net
Regards
karthik
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Jun 9, 2007, 8:16 AM
I suspect you intended to post this question on the VB.Net rather than the SQL Server 2005 forum but, as I think I know the answer, I'll answer it anyway :)
Try this code with the path of your .bat file:
Imports System
Imports System.Diagnostics
Module Test
Sub Main()
Dim proc As New Process()
Dim batFilePath As String = "C:\somefolder\somefile.bat"
proc.Start(batFilePath)
End Sub
End Module