VB中如何用shell执行多个引号带路径的程序?

来源:百度知道 编辑:UC知道 时间:2024/06/24 05:52:10
如题:

如要执行"D:\phpweb\MySQL\bin\mysqld-nt.exe" --install-manual MySQL --defaults-file="D:\phpweb\MySQL\my.ini"这样的文件,好如何写?
且里面的D:\phpweb要换成app.path
#GSJCLXJ

怎么换我是知道了,主要问的是引号的引用!

Shell App.Path & "\MySQL\bin\mysqld-nt.exe --install-manual MySQL --defaults-file=" & App.Path & "\MySQL\my.ini"

如果你要加上引号(") 的话可以 连一个 chr(34)
Shell App.Path & "\MySQL\bin\mysqld-nt.exe --install-manual MySQL --defaults-file=" & Chr(34) & App.Path & "\MySQL\my.ini" & Chr(34)

如要执行"D:\phpweb\MySQL\bin\mysqld-nt.exe" --install-manual MySQL --defaults-file="D:\phpweb\MySQL\my.ini"且里面的D:\phpweb要换成app.path
懂了吧

关于引号作用
好像是直接加引号