12 Commits

Author SHA1 Message Date
Michael Möller
165be259c6 Added another catch clause to the StartupManager to handle issues with the TaskScheduler. 2020-02-27 22:12:10 +01:00
Michael Möller
c827a83dff Attempted fix for the ArgumentException when calling ITaskService.GetRunningTasks on some systems. 2020-02-25 23:25:52 +01:00
Michael Möller
2e3489e1f7 Changed the license to the Mozilla Public License 2.0 and update the licensing information. 2012-05-27 14:23:31 +00:00
Michael Möller
4158415801 Fixed an UnauthorizedAccessException when modifying the auto-startup registry entry. 2010-09-14 19:23:11 +00:00
Michael Möller
589ba48753 Fixed Issue 71. 2010-06-27 13:02:02 +00:00
Michael Möller
22ead80405 Fixed Issue 73. 2010-06-12 12:15:00 +00:00
Michael Möller
1fc256f0b6 Fixed Issue 64. 2010-05-29 13:49:20 +00:00
Michael Möller
059cf44ab7 Fixed an UnauthorizedAccessException in the StartupManager. The exception occurred when the application was running without administrator rights. A task for the current user could be created manually, but RegisterTaskDefinition somehow always throws an UnauthorizedAccessException. The current fix restricts the TaskScheduler startup method to accounts with administrator rights.
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
   at OpenHardwareMonitor.TaskScheduler.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TASK_LOGON_TYPE LogonType, Object sddl)
   at OpenHardwareMonitor.GUI.StartupManager.CreateSchedulerTask()
   at OpenHardwareMonitor.GUI.StartupManager.set_Startup(Boolean value)
   at OpenHardwareMonitor.GUI.MainForm.runOnWindowsStartupToolStripMenuItem_CheckedChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnCheckedChanged(EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.set_CheckState(CheckState value)
   at System.Windows.Forms.ToolStripMenuItem.set_Checked(Boolean value)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
2010-05-21 17:28:52 +00:00
Michael Möller
4c3fdb2c82 Fixed Issue 60. 2010-05-18 19:12:13 +00:00
Michael Möller
03bdb34ed4 Fixed exception handling in StartupManager (some systems throw a DirectoryNotFoundException instead of a FileNotFoundException). 2010-04-28 06:55:45 +00:00
Michael Möller
160f0bd783 Fixed a few more crash causing bugs. 2010-04-26 19:22:42 +00:00
Michael Möller
e0e30c4b55 Added an option to automatically startup after Windows logon using the Task Scheduler 2.0 for Windows Vista/7 or the Registry for Windows XP. 2010-03-26 20:58:10 +00:00