Skip to content
Snippets Groups Projects
Unverified Commit 2920e9a3 authored by fireice-uk's avatar fireice-uk Committed by GitHub
Browse files

Merge pull request #306 from psychocrypt/topic-noWaitWindows

add environment variable `XMRSTAK_NOWIT`
parents 4f7699eb b203d4b4
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@ The number of files depends on the available backends.
1) Double click the `xmr-stak.exe` file
2) Fill in the pool url, username and password
`set XMRSTAK_NOWAIT=1` disable the dialog `Press any key to exit.` for non UAC execution.
## Usage on Linux & MacOS
1) Open a terminal within the folder with the binary
2) Start the miner with `./xmr-stak`
......
......@@ -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;
}
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment