diff --git a/doc/usage.md b/doc/usage.md
index a13586ffbfe49c881bf123dbe6c34cd65425e000..edd5c898de334f5bafffb20d6515374fba8d21b9 100644
--- a/doc/usage.md
+++ b/doc/usage.md
@@ -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`
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp
index e152a026f8d1808b23f845eb59a48d143f53bc62..e32733b750e508386012e226fc19ab7ee53f125d 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 8de5948bc39b665e1e7cd4cc7634542d90531abd..980760ecf0397793deadd0b23feddceedc89449d 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);
 }