From 03bdb34ed428ed2df2aacc491dc4006c5fd36ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Wed, 28 Apr 2010 06:55:45 +0000 Subject: [PATCH] Fixed exception handling in StartupManager (some systems throw a DirectoryNotFoundException instead of a FileNotFoundException). --- GUI/StartupManager.cs | 8 ++++---- Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/GUI/StartupManager.cs b/GUI/StartupManager.cs index f7d5bf9..b7fa66b 100644 --- a/GUI/StartupManager.cs +++ b/GUI/StartupManager.cs @@ -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() { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 03293f4..d9acf30 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -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")]