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,7 +394,9 @@ 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) else
{
try
{ {
//Registry reading error. Check for existance of file nvsvs.dll instead. //Registry reading error. Check for existance of file nvsvs.dll instead.
if (System.IO.File.Exists(Path.Combine(Environment.SystemDirectory, "nvsvs.dll"))) if (System.IO.File.Exists(Path.Combine(Environment.SystemDirectory, "nvsvs.dll")))
@ -402,7 +404,7 @@ namespace EnvyUpdate
else else
return false; return false;
} }
else catch (Exception)
{ {
MessageBox.Show("An error has occured. Please report this on GitHub.\nError:" + ex.Message); MessageBox.Show("An error has occured. Please report this on GitHub.\nError:" + ex.Message);
Environment.Exit(20); Environment.Exit(20);
@ -410,6 +412,7 @@ namespace EnvyUpdate
} }
} }
} }
}
public static int GetDTCID() public static int GetDTCID()
{ {
int dtcid = 0; int dtcid = 0;