Permalink
Browse files

Disable checking for UAC elevation on < Vista, closes #7

  • Loading branch information...
1 parent 42bd4f2 commit 72224fe131871aa36bdda103877ede596344a5e7 @paulcbetts paulcbetts committed Sep 25, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 Program.cs
View
@@ -138,6 +138,12 @@ public static string ForceLineEndings(string fileData, LineEndingType type)
public static unsafe bool IsProcessElevated()
{
+ if (Environment.OSVersion.Version < new Version(6,0,0,0))
+ {
+ // Elevation is not a thing.
+ return false;
+ }
+
IntPtr tokenHandle;
if (!NativeMethods.OpenProcessToken(NativeMethods.GetCurrentProcess(), NativeMethods.TOKEN_QUERY, out tokenHandle))
{

0 comments on commit 72224fe

Please sign in to comment.