我尝试过这种变化,但除了能够启动cygwin窗口之外没有其他运气.(包裹;为清楚起见)
Filename: "c:\cygwin\bin\bash.exe"; Parameters: "-c c:/scripts/step1.sh paramX"; Flags: shellexec waituntilterminated; StatusMsg: "Running the script..."
(这是用于内部安装,因此安装了cywin,并且所有路径,脚本都是已知的)
你的问题是-c
告诉bash从下一个参数读取指令:例如
c:\cygwin\bin\bash.exe -c 'for NUM in 1 2 3 4 5 6 7 8 9 10; do echo $NUM; done'
您只需要:
c:\cygwin\bin\bash.exe "/scripts/step1.sh paramX"
所以你的代码看起来像:
Filename: "c:\cygwin\bin\bash.exe"; Parameters: "c:/scripts/step1.sh paramX"; Flags: shellexec waituntilterminated; StatusMsg: "Running the script..."
也许这对其他人有帮助:)