Bump and argh

This commit is contained in:
fyr77 2021-05-02 16:24:05 +02:00
parent babacb68dd
commit bc26b5caac
2 changed files with 15 additions and 12 deletions

View file

@ -9,7 +9,7 @@ namespace EnvyUpdate
public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location; public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location;
public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\"; public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\";
public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
public static readonly float version = 2.4F; public static readonly float version = 2.5F;
public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\"; public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\";
public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
public static readonly string desktopOverride = exepath + "desktop.envy"; public static readonly string desktopOverride = exepath + "desktop.envy";

View file

@ -394,19 +394,22 @@ namespace EnvyUpdate
// Assume no DCH driver is installed if key is not found. // Assume no DCH driver is installed if key is not found.
return false; return false;
} }
else if (ex.InnerException is System.Security.SecurityException)
{
//Registry reading error. Check for existance of file nvsvs.dll instead.
if (System.IO.File.Exists(Path.Combine(Environment.SystemDirectory, "nvsvs.dll")))
return true;
else
return false;
}
else else
{ {
MessageBox.Show("An error has occured. Please report this on GitHub.\nError:" + ex.Message); try
Environment.Exit(20); {
return false; //Registry reading error. Check for existance of file nvsvs.dll instead.
if (System.IO.File.Exists(Path.Combine(Environment.SystemDirectory, "nvsvs.dll")))
return true;
else
return false;
}
catch (Exception)
{
MessageBox.Show("An error has occured. Please report this on GitHub.\nError:" + ex.Message);
Environment.Exit(20);
return false;
}
} }
} }
} }