c# - How can I determine if a console app was executed from within a batch file? -
i have console application in need observe whether or not executed command line, opposed within batch file. want protect
console.write ( "press key exit" ); console.readkey ( true ); console.writeline ( );
from executing when app executing within batch file.
you can crazy things (like parent process, see arguments got etc), if command app add together command line argument, phone call "batch mode" or whatever , when programme invoked create non-interactive.
c# batch-file
No comments:
Post a Comment