Licenses/WinRing0.License.txt
author moel.mich
Fri, 21 May 2010 17:28:52 +0000
changeset 123 912a06e2bd53
permissions -rw-r--r--
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)
moel@1
     1
Copyright (c) 2007-2009 OpenLibSys.org. All rights reserved.
moel@1
     2
moel@1
     3
Redistribution and use in source and binary forms, with or without
moel@1
     4
modification, are permitted provided that the following conditions
moel@1
     5
are met:
moel@1
     6
1. Redistributions of source code must retain the above copyright
moel@1
     7
   notice, this list of conditions and the following disclaimer.
moel@1
     8
2. Redistributions in binary form must reproduce the above copyright
moel@1
     9
   notice, this list of conditions and the following disclaimer in the
moel@1
    10
   documentation and/or other materials provided with the distribution.
moel@1
    11
moel@1
    12
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
moel@1
    13
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
moel@1
    14
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
moel@1
    15
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
moel@1
    16
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
moel@1
    17
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
moel@1
    18
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
moel@1
    19
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
moel@1
    20
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
moel@1
    21
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.