Shell 使用参数启动应用程序的命令

Shell Command to launch application with parameters

我正在尝试从 VBA 启动 spotfire 应用程序,如下所示

Dim retval As Double
retval = Shell("Path\Spotfire.Dxp.exe", vbNormalFocus)

有效。它使用默认的服务器名、用户名和密码启动 spotfire

但我想通过在脚本中提供服务器名、用户名和密码作为参数来启动应用程序。我该怎么做?

我试过了

retval = Shell("Path\Spotfire.Dxp.exe -s http://spotfire.abcd.com -u ABCD\A7 -p ABC", vbNormalFocus)

但是它使用默认参数启动应用程序并在最后给出错误"Unable to load file. Could not find the specified file : -s"

请提出可能的解决方案。

在检查了我们的支持数据库后,我发现了一些对 / 符号的引用,而不是 -。所以下面的命令应该可以工作:

c:\path\Spotfire.Dxp.exe /server:http://localhost:8080/ /username:user /password:pass