The application requires higher run privileges to be able modify
network settings. With this change, there is no need to start
the tool explicitly in console with administrator rights.

Signed-off-by: Ľubomír Carik <lubomir.ca...@gmail.com>
---
 openconnect.exe.manifest | 11 +++++++++++
 openconnect.rc           |  3 +++
 2 files changed, 14 insertions(+)
 create mode 100644 openconnect.exe.manifest

diff --git a/openconnect.exe.manifest b/openconnect.exe.manifest
new file mode 100644
index 0000000..51a810d
--- /dev/null
+++ b/openconnect.exe.manifest
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+    <security>
+      <requestedPrivileges>
+        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" 
/>
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+</assembly>
diff --git a/openconnect.rc b/openconnect.rc
index c4165a0..64bff48 100644
--- a/openconnect.rc
+++ b/openconnect.rc
@@ -1,3 +1,6 @@
+// UAC: require administrator
+1 24 "openconnect.exe.manifest"
+
 // application icon
 IDI_ICON1       ICON    DISCARDABLE     "openconnect.ico"
 
-- 
2.16.2


_______________________________________________
openconnect-devel mailing list
openconnect-devel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/openconnect-devel

Reply via email to