Detecting how a batch file was executed

后端 未结 9 1837
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 08:24

Assuming Windows, is there a way I can detect from within a batch file if it was launched from an open command prompt or by double-clicking? I\'d like to add a pause to the

9条回答
  •  星月不相逢
    2020-12-28 09:07

    Don't overlook the solution of having two batch files:
    abatfile.bat and abatfile-with-pause.bat
    The second simply calling the first and adding a pause

提交回复
热议问题