i'm using shell to execute a command line command
the code i'm using is below
if i run the code below i see a quickly closing shell window, and i can tell that mysql was run with incorrect parameters. (the mysql help/usage text scrolls before closing)
if i break on Shell(cmd,.....) and do
in the immediate window i get a string
""C:\Program Files\MySql\MySQL Server 5.1\bin\mysql.exe" -uMyUser -pMyPass -h192.268.1.105 MyDB < "r:\visual studio 2008\projects\MyApp\sql\dr
if i copy the string that is inside the outer "", paste that in a command prompt it runs fine.
what am I missing?
Private Const MYSQL_APP as string = "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.exe"
Dim dir as DirectoryInfo = new DirectoryInfo("r:\visual studio 2008\projects\MyApp\sql\"
dim File as FileInfo=dir.getFiles("*.sql")(0)
Dim cmd As String = """" & MYSQL_APP & """" & " -uMyUser -pMyPass -h192.168.1.105 MyDB < " & """" & file.DirectoryName & "\drop_system.sql" & """"
Shell(cmd, AppWinStyle.NormalFocus, True)