summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--doc/compile.md3
-rw-r--r--xmrstak/cli/cli-miner.cpp9
3 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ee800e..015f7c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -413,6 +413,12 @@ set(LIBRARY_OUTPUT_PATH "bin")
target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
+option(WIN_UAC "Add UAC manifest on Windows" ON)
+
+if(WIN_UAC AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ set_property(TARGET xmr-stak PROPERTY LINK_FLAGS "/level='requireAdministrator' /uiAccess='false'")
+endif()
+
################################################################################
# Install
################################################################################
diff --git a/doc/compile.md b/doc/compile.md
index 8ad410d..248d6d9 100644
--- a/doc/compile.md
+++ b/doc/compile.md
@@ -44,6 +44,9 @@ After the configuration you need to compile the miner, follow the guide for your
- there is no *http* interface available if option is disabled: `cmake .. -DMICROHTTPD_ENABLE=OFF`
- `OpenSSL_ENABLE` allow to disable/enable the dependency *OpenSSL*
- it is not possible to connect to a *https* secured pool if option is disabled: `cmake .. -DOpenSSL_ENABLE=OFF`
+- `WIN_UAC` will enable or disable the "Run As Administrator" prompt on Windows.
+ - UAC confirmation is needed to use large pages on Windows 7.
+ - On Windows 10 it is only needed once to set up the account to use them.
## CPU Build Options
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp
index 9be93a4..2760deb 100644
--- a/xmrstak/cli/cli-miner.cpp
+++ b/xmrstak/cli/cli-miner.cpp
@@ -36,10 +36,6 @@
# include "xmrstak/http/httpd.hpp"
#endif
-#ifdef _WIN32
-# include "xmrstak/misc/uac.hpp"
-#endif
-
#include <stdlib.h>
#include <stdio.h>
#include <string>
@@ -92,11 +88,6 @@ void help()
int main(int argc, char *argv[])
{
-#ifdef _WIN32
- if (!IsElevated() && SelfElevate(argv[0]))
- return 0;
-#endif
-
#ifndef CONF_NO_TLS
SSL_library_init();
SSL_load_error_strings();
OpenPOWER on IntegriCloud