# HG changeset patch # User moel.mich # Date 1275140960 0 # Node ID efb1b414d33e4098546a4985c60cfce880c52b81 # Parent cea5477b4d72d1d27c6500daf6a49defd35155fc Fixed Issue 64. diff -r cea5477b4d72 -r efb1b414d33e GUI/StartupManager.cs --- a/GUI/StartupManager.cs Tue May 25 22:33:03 2010 +0000 +++ b/GUI/StartupManager.cs Sat May 29 13:49:20 2010 +0000 @@ -75,7 +75,17 @@ try { ITaskFolder folder = scheduler.GetFolder("\\Open Hardware Monitor"); IRegisteredTask task = folder.GetTask("Startup"); - startup = task != null; + startup = (task != null) && + (task.Definition.Triggers.Count > 0) && + (task.Definition.Triggers[1].Type == + TASK_TRIGGER_TYPE2.TASK_TRIGGER_LOGON) && + (task.Definition.Actions.Count > 0) && + (task.Definition.Actions[1].Type == + TASK_ACTION_TYPE.TASK_ACTION_EXEC) && + (task.Definition.Actions[1] as IExecAction != null) && + ((task.Definition.Actions[1] as IExecAction).Path == + Application.ExecutablePath); + } catch (IOException) { startup = false; } catch (UnauthorizedAccessException) {