I’m currently using this method in calling batch files in vb.net:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
System.Diagnostics.Process.Start("F:\ipconfigflushdns.bat")
End Sub
Is it possible to incorporate the code written in the batch file so that I won’t have to call it like the one above?
Yes, what you have shown will work. However, I would recommend that you rename your batch file with .cmd extension. This is more proper on Windows and causes there to be no ambiguity as to whether the 32-bit/64-bit Windows
cmd.exeor the 16-bit MS-DOS compatibilitycommand.comshould be used loaded.See: Windows batch files: .bat vs .cmd?
Sure, it is possible. You’ll need to take the typical approach for porting a program from one language to a very different one. That is, read the batch file and figure out manually how to do the same things using the .NET Framework.