doucanrui1735 2014-04-16 14:28
浏览 445

在批处理文件中运行带有参数的exe文件

Please have a look at my batch file.

echo off
start "c:\program files\php\php.exe D:\mydocs\mp\index.php param1 param2"

but it isn't working. Any ideas how do I get it working?

  • 写回答

3条回答 默认 最新

  • dongliantong3229 2014-04-16 14:33
    关注

    This should work:

    start "" "c:\program files\php\php.exe" D:\mydocs\mp\index.php param1 param2
    

    The start command interprets the first argument as a window title if it contains spaces. In this case, that means start considers your whole argument a title and sees no command. Passing "" (an empty title) as the first argument to start fixes the problem.

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料