OpenHardwareMonitor.sln
author moel.mich
Fri, 21 May 2010 17:28:52 +0000
changeset 123 912a06e2bd53
child 165 813d8bc3192f
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

moel@1
     2
Microsoft Visual Studio Solution File, Format Version 10.00
moel@1
     3
# Visual Studio 2008
moel@1
     4
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenHardwareMonitor", "OpenHardwareMonitor.csproj", "{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}"
moel@1
     5
EndProject
moel@1
     6
Global
moel@1
     7
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
moel@1
     8
		Debug|Any CPU = Debug|Any CPU
moel@1
     9
		Release|Any CPU = Release|Any CPU
moel@1
    10
	EndGlobalSection
moel@1
    11
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
moel@1
    12
		{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
moel@1
    13
		{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|Any CPU.Build.0 = Debug|Any CPU
moel@1
    14
		{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|Any CPU.ActiveCfg = Release|Any CPU
moel@1
    15
		{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|Any CPU.Build.0 = Release|Any CPU
moel@1
    16
	EndGlobalSection
moel@1
    17
	GlobalSection(SolutionProperties) = preSolution
moel@1
    18
		HideSolutionNode = FALSE
moel@1
    19
	EndGlobalSection
moel@1
    20
	GlobalSection(MonoDevelopProperties) = preSolution
moel@1
    21
		StartupItem = OpenHardwareMonitor.csproj
moel@1
    22
		Policies = $0
moel@1
    23
		$0.DotNetNamingPolicy = $1
moel@1
    24
		$1.DirectoryNamespaceAssociation = None
moel@1
    25
		$1.ResourceNamePolicy = FileFormatDefault
moel@1
    26
		$0.TextStylePolicy = $2
moel@1
    27
		$2.FileWidth = 120
moel@1
    28
		$2.TabWidth = 2
moel@1
    29
		$2.NoTabsAfterNonTabs = True
moel@1
    30
		$2.inheritsSet = VisualStudio
moel@1
    31
		$2.inheritsScope = text/plain
moel@1
    32
		$2.scope = text/plain
moel@1
    33
		$0.TextStylePolicy = $3
moel@1
    34
		$3.inheritsSet = null
moel@1
    35
		$3.scope = text/x-csharp
moel@1
    36
		$0.CSharpFormattingPolicy = $4
moel@1
    37
		$4.inheritsSet = Mono
moel@1
    38
		$4.inheritsScope = text/x-csharp
moel@1
    39
		$4.scope = text/x-csharp
moel@1
    40
	EndGlobalSection
moel@1
    41
EndGlobal