Detecting how a batch file was executed

后端 未结 9 1838
伪装坚强ぢ
伪装坚强ぢ 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:13

    Similar to a second batch file you could also pause if a certain parameter is not given (called via clicking).

    This would mean only one batch file but having to specify a -nopause parameter or something like that when calling from the console.

提交回复
热议问题