DOS command in VB.NET
Posted on 2007-11-27
Hello, I simply need to execute DOS command from VB.NET code.
This is the code that I run from DOS:
C:\Program Files\omniformat\omniformat.exe "C:\test\test.xls" "PDF"
So, how to execute this same command from VB.NET.
I assume it would use something in this format:
Dim pInfo As New ProcessStartInfo("command/filename", "arguments")
Dim p As New Process()
p.StartInfo = pInfo
but I am not sure what is the correct syntax i.e. what should be my command/filename, and what goes under arguments.
Can someoneprovide me with the code that will work in my situation?