AlbertMN/AssistantComputerControl

ACC launches at startup regardless of program settings

Stephanie-Spears opened this issue · 2 comments

Describe the bug
ACC launches at startup regardless of checkbox value in program settings > "Start with Windows?"

To Reproduce
Steps to reproduce the behavior:

  1. Go to Assistant Computer Control app settings
  2. Uncheck box for 'Start with Windows?'
  3. Restart PC
  4. Program still launches at startup, visible in taskbar icons

Hardware & software info (please complete the following information):

  • Windows 10 Pro - 10.0.19045 Build 19045
  • Assistant Computer Control - v1.4.6

Additional context & log files
I disabled "Check for updates?" in ACC settings to see if that was triggering the startup launch, but seems not to have changed anything.
I also have another computer running Windows 10 Pro and am seeing the same behavior on that machine as well.

log.txt

I get a similar, but worse error, I am not sure if is related. I have installed, uninstalled and reinstalled it multiple times and while it works fine on the first start, it subsequently always fails with these errors:

Hardware & software info (please complete the following information):

Windows 11 Pro - 22H2 Build 22621.2283
Assistant Computer Control - v1.4.6

2023-09-26 20:00:52.4155|DEBUG|AssistantComputerControl.MainProgram|[ACC begun (v1.4.6)]
2023-09-26 20:00:52.4826|DEBUG|AssistantComputerControl.MainProgram|Checking for updates...
2023-09-26 20:00:52.5253|DEBUG|AssistantComputerControl.MainProgram|Deleting all files in action folder
2023-09-26 20:00:52.5253|DEBUG|AssistantComputerControl.MainProgram|Old action files removed - moving on...
2023-09-26 20:00:52.5882|DEBUG|AssistantComputerControl.MainProgram|
[AssistantComputerControl] Initiated. 
Listening in: "C:\Users\Kristian\OneDrive\AssistantComputerControl" for ".txt" extensions
2023-09-26 20:00:53.0248|DEBUG|AssistantComputerControl.MainProgram|Failed to create / update cleanup Task Scheduler service; Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
2023-09-26 20:00:54.2797|DEBUG|AssistantComputerControl.MainProgram|Software up to date
2023-09-26 20:16:09.8839|DEBUG|AssistantComputerControl.MainProgram|Failed to create startup task. Defaulting to starting with Windows registry. Exception was; Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), trace; +    at Microsoft.Win32.TaskScheduler.V2Interop.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TaskLogonType LogonType, Object sddl)
   at Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String path, TaskDefinition definition, TaskCreation createType, String userId, String password, TaskLogonType logonType, String sddl)
   at Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String path, TaskDefinition definition)
   at AssistantComputerControl.MainProgram.SetStartup(Boolean status, Boolean setThroughSoftware)_
2023-09-26 20:16:09.8839|DEBUG|AssistantComputerControl.MainProgram|ACC now starts with Windows (Registry)

So, just an an update on a workaround, I:

  • Disabled the "Start with Windows" option in the ACC settings (which removes that Taskscheduler Task); and
  • Left the ACC cleanup Task in Task scheduler, and
  • Added (in the Startup Dir accessed using START +R, shell:startup) a shortcut to ACC in the Windows startup folder.

No more errors due to double starting; so far at least.