delphi ShellExecute 传递多个参数

delphi  ShellExecute 传递多个参数

如果调用的exe 接收多个参数。

一般无特殊可以用空格隔开,但是如果参数的值本身有空格。则得按这样的格式来传递  "p1","p2"

参数值有空格

 ShellExecute(0, 'open',PAnsiChar('exe') , PAnsiChar('"123 test" "abc"'), nil, SW_SHOWNORMAL);

参数值没有空格

 ShellExecute(0, 'open',PAnsiChar('exe') , PAnsiChar('123 abc'), nil, SW_SHOWNORMAL);

原文地址:https://www.cnblogs.com/BTag/p/15743909.html