diff options
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/cli/cli-miner.cpp | 6 | ||||
-rw-r--r-- | xmrstak/misc/console.cpp | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp index e152a02..e32733b 100644 --- a/xmrstak/cli/cli-miner.cpp +++ b/xmrstak/cli/cli-miner.cpp @@ -87,6 +87,12 @@ void help() cout<<" -u, --user USERNAME pool user name or wallet address"<<endl; cout<<" -p, --pass PASSWD pool password, in the most cases x or empty \"\""<<endl; cout<<" \n"<<endl; +#ifdef _WIN32 + cout<<"Environment variables:\n"<<endl; + cout<<" XMRSTAK_NOWAIT disable the dialog `Press any key to exit."<<std::endl; + cout<<" for non UAC execution"<<endl; + cout<<" \n"<<endl; +#endif cout<< "Version: " << get_version_str_short() << endl; cout<<"Brought to by fireice_uk and psychocrypt under GPLv3."<<endl; } diff --git a/xmrstak/misc/console.cpp b/xmrstak/misc/console.cpp index 8de5948..980760e 100644 --- a/xmrstak/misc/console.cpp +++ b/xmrstak/misc/console.cpp @@ -222,8 +222,13 @@ void printer::print_str(const char* str) #ifdef _WIN32 void win_exit(size_t code) { - printer::inst()->print_str("Press any key to exit."); - get_key(); + size_t envSize = 0; + getenv_s(&envSize, nullptr, 0, "XMRSTAK_NOWAIT"); + if(envSize == 0) + { + printer::inst()->print_str("Press any key to exit."); + get_key(); + } std::exit(code); } |