log4j-finder
log4j-finder copied to clipboard
Prevent console from closing when running as an frozen executable on windows
proposal for #63
I think we also need an option for not pausing, for example --no-auto-prompt
, or else everyone that is deploying log4j-finder automatically will have a pause that cannot be cancelled.
Instead of os.system("pause")
the following is preffered input("Press any key to continue..")
so we do not execute a subprocess.
Also now Windows users always get this prompt, which could be annoying. We could make an autodetect if run via console or Explorer/GUI on windows, but still override it with the --no-auto-prompt
in case it doesn't work properly.
I have googled a bit and people seem to detect if run via cmd.exe or powershell.exe by checking if some Environment variables exists. For example PROMPT
and PsModulePath
, these do not exist when run via Explorer.