如何自动检测mysqldump.exe的路径?

时间:2015-01-28 11:23:35

标签: mysql vb.net mysqldump

我是vb.net的新手,我怎样才能动态检测路径" E:\ xampp \ mysql \ bin \"?这是我的代码,这是工作。请帮帮我。非常感谢提前:)。

mp.StartInfo.FileName = "cmd.exe"
mp.StartInfo.UseShellExecute = False
mp.StartInfo.WorkingDirectory = "E:\xampp\mysql\bin\"
mp.StartInfo.RedirectStandardInput = True
mp.StartInfo.RedirectStandardOutput = True
mp.StartInfo.CreateNoWindow = True
mp.Start()
Dim sw As StreamWriter = mp.StandardInput
Dim Sr As StreamReader = mp.StandardOutput

sw.WriteLine("mysqldump -t -u root DB table1 table2 --where=reset=0 > dump.sql ")
sw.Close()
mp.WaitForExit()
mp.Close()

0 个答案:

没有答案
相关问题