Licenses/Aga.Controls.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
The BSD License
moel@1
     2
moel@1
     3
Copyright (c) 2009, Andrey Gliznetsov (a.gliznetsov@gmail.com)
moel@1
     4
moel@1
     5
All rights reserved.
moel@1
     6
moel@1
     7
Redistribution and use in source and binary forms, with or without modification, are permitted provided 
moel@1
     8
that the following conditions are met
moel@1
     9
moel@1
    10
- Redistributions of source code must retain the above copyright notice, this list of conditions 
moel@1
    11
and the following disclaimer.
moel@1
    12
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions 
moel@1
    13
and the following disclaimer in the documentation andor other materials provided with the distribution.
moel@1
    14
moel@1
    15
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
moel@1
    16
AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
moel@1
    17
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
moel@1
    18
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
moel@1
    19
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
moel@1
    20
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
moel@1
    21
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
moel@1
    22
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
moel@1
    23
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
moel@1
    24
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
moel@1
    25
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.