Fixed exception handling in StartupManager (some systems throw a DirectoryNotFoundException instead of a FileNotFoundException).

This commit is contained in:
Michael Möller
2010-04-28 06:55:45 +00:00
parent d868dda7fb
commit 03bdb34ed4
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -55,7 +55,7 @@ namespace OpenHardwareMonitor.GUI {
try {
scheduler = new TaskSchedulerClass();
scheduler.Connect(null, null, null, null);
} catch (Exception) {
} catch {
scheduler = null;
}
@@ -101,7 +101,7 @@ namespace OpenHardwareMonitor.GUI {
ITaskFolder folder;
try {
folder = root.GetFolder("Open Hardware Monitor");
} catch (FileNotFoundException) {
} catch (IOException) {
folder = root.CreateFolder("Open Hardware Monitor", "");
}
folder.RegisterTaskDefinition("Startup", definition,
@@ -114,10 +114,10 @@ namespace OpenHardwareMonitor.GUI {
try {
ITaskFolder folder = root.GetFolder("Open Hardware Monitor");
folder.DeleteTask("Startup", 0);
} catch (FileNotFoundException) { }
} catch (IOException) { }
try {
root.DeleteFolder("Open Hardware Monitor", 0);
} catch (FileNotFoundException) { }
} catch (IOException) { }
}
private void CreateRegistryRun() {
+2 -2
View File
@@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.32.0")]
[assembly: AssemblyFileVersion("0.1.32.0")]
[assembly: AssemblyVersion("0.1.33.0")]
[assembly: AssemblyFileVersion("0.1.33.0")]