Skip to content

Doesn't open with boot #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tellmewhy12 opened this issue Sep 25, 2021 · 20 comments
Closed

Doesn't open with boot #259

tellmewhy12 opened this issue Sep 25, 2021 · 20 comments
Labels
bug Something isn't working

Comments

@tellmewhy12
Copy link

tellmewhy12 commented Sep 25, 2021

The App doesn't start after boot and I have to start it manually and click apply for it to start working after booting (I installed as Administrator and unchecked Login-Task)

Any ideas?

OS: Windows 21H1

@tellmewhy12 tellmewhy12 changed the title Doesn't switch when starting windows Doesn't open with boot Sep 27, 2021
@Spiritreader
Copy link
Member

We're currently in the process of developing a next major version (version X/v10)
It will release on Oct 5th, as such no new fixed for v3.1 will be pushed, as it will be replaced.

We offer bleeding edge builds to our Telegram insider group, if you're up for that.
The auto start behavior there should be fixed, and the log in task is being investigated currently.
https://github.com/AutoDarkMode/Windows-Auto-Night-Mode#telegram-group

@tellmewhy12
Copy link
Author

Telegram? Interesting, usually these cults are on Discord or Slack :P

@Spiritreader
Copy link
Member

Overlord @Armin2208 is a telegram fanboi, as such we reside there!

@Spiritreader
Copy link
Member

Version X is out, please download, try again and close the issue if it works

@tellmewhy12
Copy link
Author

@Spiritreader Awesome! I will check it out.

@Spiritreader
Copy link
Member

On the time page, you might have to put it to disabled, and then back to the setting you had before to make it work.

@Spiritreader Spiritreader added the bug Something isn't working label Oct 5, 2021
@tellmewhy12
Copy link
Author

tellmewhy12 commented Oct 6, 2021

Hello again! Okay, the App still didn't start with boot. But what improved this time is that it automatically switched theme after I started the app and I didn't have to click "Apply" anymore! And there is a tray Icon. I really like the new features btw. Accent colour is great 🤩

I have Login-Task unchecked right now.
image

If I try checking it I get the error
image

But after starting it in Administrator mode it didn't give me an error.

I will try restarting my PC and see if it starts the App.

EDIT: It didn't work, I might try putting it into shell:startup

@Spiritreader
Copy link
Member

Spiritreader commented Oct 6, 2021

Can you attach the service.log? (make sure you remove all geographic coordinates before)
The interface tells you there is an issue, but only the service.log contains the actual error messages

@tellmewhy12
Copy link
Author

2021-10-05 15:50:16 | Info | Program.Main: commit hash: 9faf1f3 
2021-10-05 15:51:03 | Info | ZeroMQServer.Start: socket bound to port: 61849 
2021-10-05 15:51:03 | Info | ZeroMQServer.Start: started server (polling) 
2021-10-05 15:51:03 | Info | PowerEventHandler.RegisterResumeEvent: enabling theme refresh at system resume 
2021-10-05 15:51:05 | Info | MessageParser.Parse: signal received: request for running status 
2021-10-05 15:51:28 | Info | ModuleTimer.RegisterModule: registered UpdaterModule to timer io 
2021-10-05 15:51:28 | Info | ModuleTimer.RegisterModule: registered ModuleWarden to timer main 
2021-10-05 15:51:28 | Info | ModuleTimer.Start: starting main timer with 60000 ms timer interval 
2021-10-05 15:51:28 | Info | ModuleTimer.Start: starting io timer with 7200000 ms timer interval 
2021-10-05 15:51:28 | Info | ModuleTimer.Start: starting geopos timer with 3600000 ms timer interval 
2021-10-05 15:51:28 | Info | ModuleTimer.Start: starting state_update timer with 300000 ms timer interval 
2021-10-05 16:28:06 | Info | LocationHandler.UpdateSunTime: new sunrise (13:54) and new sunset (21:10) 
2021-10-05 16:28:06 | Info | ModuleTimer.RegisterModule: registered GeopositionUpdateModule to timer geopos 
2021-10-05 16:28:06 | Info | ModuleTimer.RegisterModule: registered TimeSwitchModule to timer main 
2021-10-05 16:28:06 | Info | MessageParser.Parse: signal received: add service to autostart 
2021-10-05 16:28:06 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-05 16:28:06 | Info | MessageParser.Parse: signal received: invoke theme switch 
2021-10-05 16:28:06 | Info | ThemeManager.SwitchTheme: theme switch invoked manually 
2021-10-05 16:28:06 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-05 16:28:39 | Info | MessageParser.Parse: signal received: invoke theme switch 
2021-10-05 16:28:39 | Info | ThemeManager.SwitchTheme: theme switch invoked manually 
2021-10-05 16:31:44 | Info | MessageParser.Parse: signal received: add service to autostart 
2021-10-05 16:31:44 | Error | TaskSchdHandler.CreateLogonTask: failed to create logon task,  Zugriff verweigert (0x80070005 (E_ACCESSDENIED))
2021-10-05 16:32:04 | Info | MessageParser.Parse: signal received: add service to autostart 
2021-10-05 16:32:54 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-05 16:32:54 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-05 16:32:59 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-05 16:32:59 | Info | MessageParser.Parse: signal received: invoke theme switch 
2021-10-05 16:32:59 | Info | ThemeManager.SwitchTheme: theme switch invoked manually 
2021-10-05 16:32:59 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-05 16:33:22 | Info | LocationHandler.UpdateSunTime: new sunrise (02:16) and new sunset (13:39) 
2021-10-05 16:33:23 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-05 16:33:23 | Info | MessageParser.Parse: signal received: invoke theme switch 
2021-10-05 16:33:23 | Info | ThemeManager.SwitchTheme: theme switch invoked manually 
2021-10-05 16:33:23 | Info | AppsSwitch.HandleSwitch: update info - previous: Light, current: Dark, mode: Switch 
2021-10-05 16:33:23 | Info | SystemSwitch.SwitchSystemTheme: Light 
2021-10-05 16:33:24 | Info | SystemSwitch.SwitchSystemTheme: update info - previous: Light, current: Dark, mode: Switch, accent: yes 
2021-10-05 16:33:24 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-05 16:33:45 | Info | LocationHandler.UpdateSunTime: new sunrise (07:34) and new sunset (18:58) 
2021-10-05 16:33:45 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-05 16:33:45 | Info | MessageParser.Parse: signal received: invoke theme switch 
2021-10-05 16:33:45 | Info | ThemeManager.SwitchTheme: theme switch invoked manually 
2021-10-05 16:33:45 | Info | AppsSwitch.HandleSwitch: update info - previous: Dark, current: Light, mode: Switch 
2021-10-05 16:33:47 | Info | SystemSwitch.SwitchSystemTheme: update info - previous: Dark, current: Light, mode: Switch, accent: yes 
2021-10-05 16:33:47 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-05 20:16:55 | Info | PowerEventHandler.SystemEvents_PowerModeChanged: system resuming from suspended state, refreshing theme 
2021-10-05 20:17:02 | Info | AppsSwitch.HandleSwitch: update info - previous: Light, current: Dark, mode: Switch 
2021-10-05 20:17:03 | Info | SystemSwitch.SwitchSystemTheme: Light 
2021-10-05 20:17:04 | Info | SystemSwitch.SwitchSystemTheme: update info - previous: Light, current: Dark, mode: Switch, accent: yes 
2021-10-05 20:17:04 | Info | ThemeManager.SwitchTheme: automatic dark theme switch performed, sunset: 18:58:07 
2021-10-06 10:29:42 | Info | Program.Main: commit hash: 9faf1f3 
2021-10-06 10:29:46 | Info | ZeroMQServer.Start: socket bound to port: 60890 
2021-10-06 10:29:46 | Info | ZeroMQServer.Start: started server (polling) 
2021-10-06 10:29:46 | Info | PowerEventHandler.RegisterResumeEvent: enabling theme refresh at system resume 
2021-10-06 10:29:46 | Info | ModuleTimer.RegisterModule: registered GeopositionUpdateModule to timer geopos 
2021-10-06 10:29:46 | Info | ModuleTimer.RegisterModule: registered TimeSwitchModule to timer main 
2021-10-06 10:29:46 | Info | AppsSwitch.HandleSwitch: update info - previous: Dark, current: Light, mode: Switch 
2021-10-06 10:29:47 | Info | MessageParser.Parse: signal received: request for running status 
2021-10-06 10:29:48 | Info | SystemSwitch.SwitchSystemTheme: update info - previous: Dark, current: Light, mode: Switch, accent: yes 
2021-10-06 10:29:48 | Info | ThemeManager.SwitchTheme: automatic light theme switch performed, sunrise: 07:34:34 
2021-10-06 10:29:49 | Info | UpdateHandler.CheckNewVersion: new version 10.0.1.9 available 
2021-10-06 10:29:49 | Info | UpdateHandler.PrepareUpdate: downloading new version 
2021-10-06 10:29:49 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-06 10:29:49 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-06 10:29:56 | Info | UpdateHandler.DownloadProgress: downloaded 10 of 106 MB. 10 % complete 
2021-10-06 10:30:01 | Info | UpdateHandler.DownloadProgress: downloaded 21 of 106 MB. 20 % complete 
2021-10-06 10:30:08 | Info | UpdateHandler.DownloadProgress: downloaded 31 of 106 MB. 30 % complete 
2021-10-06 10:30:23 | Info | UpdateHandler.DownloadProgress: downloaded 42 of 106 MB. 40 % complete 
2021-10-06 10:30:30 | Info | UpdateHandler.DownloadProgress: downloaded 53 of 106 MB. 50 % complete 
2021-10-06 10:30:37 | Info | UpdateHandler.DownloadProgress: downloaded 63 of 106 MB. 60 % complete 
2021-10-06 10:30:43 | Info | UpdateHandler.DownloadProgress: downloaded 74 of 106 MB. 70 % complete 
2021-10-06 10:30:48 | Info | UpdateHandler.DownloadProgress: downloaded 84 of 106 MB. 80 % complete 
2021-10-06 10:30:53 | Info | UpdateHandler.DownloadProgress: downloaded 95 of 106 MB. 90 % complete 
2021-10-06 10:30:59 | Info | UpdateHandler.DownloadProgress: downloaded 106 of 106 MB. 100 % complete 
2021-10-06 10:31:13 | Info | UpdateHandler.UpdateUpdater: applying updater patch 
2021-10-06 10:31:13 | Info | UpdateHandler.UpdateUpdater: updater patched successfully 
2021-10-06 10:31:13 | Info | UpdateHandler.Update: updater patch complete 
2021-10-06 10:31:19 | Info | ModuleTimer.RegisterModule: registered UpdaterModule to timer io 
2021-10-06 10:31:19 | Info | ModuleTimer.RegisterModule: registered ModuleWarden to timer main 
2021-10-06 10:31:19 | Info | ModuleTimer.Start: starting main timer with 60000 ms timer interval 
2021-10-06 10:31:19 | Info | ModuleTimer.Start: starting io timer with 7200000 ms timer interval 
2021-10-06 10:31:19 | Info | ModuleTimer.Start: starting geopos timer with 3600000 ms timer interval 
2021-10-06 10:31:19 | Info | ModuleTimer.Start: starting state_update timer with 300000 ms timer interval 
2021-10-06 10:31:19 | Info | MessageParser.Parse: signal received, exiting 
2021-10-06 10:31:19 | Info | MessageParser.Parse: signal received: request for running status 
2021-10-06 10:31:19 | Info | ZeroMQServer.Stop: stopping server 
2021-10-06 10:31:19 | Info | ModuleTimer.Stop: shutting down main timer 
2021-10-06 10:31:19 | Info | ModuleTimer.Stop: shutting down io timer 
2021-10-06 10:31:19 | Info | ModuleTimer.Stop: shutting down geopos timer 
2021-10-06 10:31:19 | Info | ModuleTimer.Stop: shutting down state_update timer 
2021-10-06 10:31:19 | Info | ModuleTimer.Dispose: main timer disposed 
2021-10-06 10:31:19 | Info | ModuleTimer.Dispose: io timer disposed 
2021-10-06 10:31:19 | Info | ModuleTimer.Dispose: geopos timer disposed 
2021-10-06 10:31:19 | Info | ModuleTimer.Dispose: state_update timer disposed 
2021-10-06 10:31:29 | Info | Program.Main: commit hash: ef7b77a 
2021-10-06 10:31:30 | Info | ZeroMQServer.Start: socket bound to port: 51316 
2021-10-06 10:31:30 | Info | ZeroMQServer.Start: started server (polling) 
2021-10-06 10:31:30 | Info | PowerEventHandler.RegisterResumeEvent: enabling theme refresh at system resume 
2021-10-06 10:31:30 | Info | ModuleTimer.RegisterModule: registered GeopositionUpdateModule to timer geopos 
2021-10-06 10:31:30 | Info | ModuleTimer.RegisterModule: registered TimeSwitchModule to timer main 
2021-10-06 10:31:30 | Info | MessageParser.Parse: signal received: request for running status 
2021-10-06 10:31:31 | Info | ModuleTimer.RegisterModule: registered UpdaterModule to timer io 
2021-10-06 10:31:31 | Info | ModuleTimer.RegisterModule: registered ModuleWarden to timer main 
2021-10-06 10:31:31 | Info | ModuleTimer.Start: starting main timer with 60000 ms timer interval 
2021-10-06 10:31:31 | Info | ModuleTimer.Start: starting io timer with 7200000 ms timer interval 
2021-10-06 10:31:31 | Info | ModuleTimer.Start: starting geopos timer with 3600000 ms timer interval 
2021-10-06 10:31:31 | Info | ModuleTimer.Start: starting state_update timer with 300000 ms timer interval 
2021-10-06 10:31:31 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-06 10:31:31 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-06 10:32:14 | Info | MessageParser.Parse: signal received: add service to autostart 
2021-10-06 10:32:14 | Error | TaskSchdHandler.CreateLogonTask: failed to create logon task,  UnauthorizedAccessException > Zugriff verweigert (0x80070005 (E_ACCESSDENIED)) > Microsoft.Win32.TaskScheduler.V2Interop.IRegisteredTask RegisterTaskDefinition(System.String, Microsoft.Win32.TaskScheduler.V2Interop.ITaskDefinition, Int32, System.Object, System.Object, Microsoft.Win32.TaskScheduler.TaskLogonType, System.Object)
2021-10-06 10:32:35 | Info | ZeroMQServer.Stop: stopping server 
2021-10-06 10:32:35 | Info | ModuleTimer.Stop: shutting down main timer 
2021-10-06 10:32:35 | Info | ModuleTimer.Stop: shutting down io timer 
2021-10-06 10:32:35 | Info | ModuleTimer.Stop: shutting down geopos timer 
2021-10-06 10:32:35 | Info | ModuleTimer.Stop: shutting down state_update timer 
2021-10-06 10:32:35 | Info | ModuleTimer.Dispose: main timer disposed 
2021-10-06 10:32:35 | Info | ModuleTimer.Dispose: io timer disposed 
2021-10-06 10:32:35 | Info | ModuleTimer.Dispose: geopos timer disposed 
2021-10-06 10:32:35 | Info | ModuleTimer.Dispose: state_update timer disposed 
2021-10-06 10:32:44 | Info | Program.Main: commit hash: ef7b77a 
2021-10-06 10:32:44 | Info | ZeroMQServer.Start: socket bound to port: 58609 
2021-10-06 10:32:44 | Info | ZeroMQServer.Start: started server (polling) 
2021-10-06 10:32:44 | Info | PowerEventHandler.RegisterResumeEvent: enabling theme refresh at system resume 
2021-10-06 10:32:44 | Info | ModuleTimer.RegisterModule: registered GeopositionUpdateModule to timer geopos 
2021-10-06 10:32:44 | Info | ModuleTimer.RegisterModule: registered TimeSwitchModule to timer main 
2021-10-06 10:32:44 | Info | ModuleTimer.RegisterModule: registered UpdaterModule to timer io 
2021-10-06 10:32:44 | Info | ModuleTimer.RegisterModule: registered ModuleWarden to timer main 
2021-10-06 10:32:44 | Info | ModuleTimer.Start: starting main timer with 60000 ms timer interval 
2021-10-06 10:32:44 | Info | ModuleTimer.Start: starting io timer with 7200000 ms timer interval 
2021-10-06 10:32:44 | Info | ModuleTimer.Start: starting geopos timer with 3600000 ms timer interval 
2021-10-06 10:32:44 | Info | ModuleTimer.Start: starting state_update timer with 300000 ms timer interval 
2021-10-06 10:32:47 | Info | MessageParser.Parse: signal received: request for running status 
2021-10-06 10:32:47 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-06 10:32:47 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-06 10:32:58 | Info | MessageParser.Parse: signal received: add service to autostart 
2021-10-06 10:32:59 | Info | MessageParser.Parse: signal received: add service to autostart 
2021-10-06 10:32:59 | Info | TaskSchdHandler.CreateLogonTask: created logon task 
2021-10-06 10:33:54 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-06 10:33:54 | Info | MessageParser.Parse: signal received: checking location access permissions 
2021-10-06 10:53:25 | Info | Program.Main: commit hash: ef7b77a 
2021-10-06 10:53:38 | Info | ZeroMQServer.Start: socket bound to port: 50938 
2021-10-06 10:53:38 | Info | ZeroMQServer.Start: started server (polling) 
2021-10-06 10:53:38 | Info | PowerEventHandler.RegisterResumeEvent: enabling theme refresh at system resume 
2021-10-06 10:53:38 | Info | ModuleTimer.RegisterModule: registered GeopositionUpdateModule to timer geopos 
2021-10-06 10:53:38 | Info | ModuleTimer.RegisterModule: registered TimeSwitchModule to timer main 
2021-10-06 10:53:40 | Info | ModuleTimer.RegisterModule: registered UpdaterModule to timer io 
2021-10-06 10:53:40 | Info | ModuleTimer.RegisterModule: registered ModuleWarden to timer main 
2021-10-06 10:53:40 | Info | ModuleTimer.Start: starting main timer with 60000 ms timer interval 
2021-10-06 10:53:40 | Info | ModuleTimer.Start: starting io timer with 7200000 ms timer interval 
2021-10-06 10:53:40 | Info | ModuleTimer.Start: starting geopos timer with 3600000 ms timer interval 
2021-10-06 10:53:40 | Info | ModuleTimer.Start: starting state_update timer with 300000 ms timer interval 
2021-10-06 10:54:48 | Info | MessageParser.Parse: signal received: request for running status 
2021-10-06 10:54:48 | Info | MessageParser.Parse: signal received: check if geolocator is busy 
2021-10-06 10:54:48 | Info | MessageParser.Parse: signal received: checking location access permissions 

@tellmewhy12
Copy link
Author

Is there an commandline argument to let it run only in the background? For if the shell:startup shortcut workaround works it might also be an alternative

@Spiritreader
Copy link
Member

Spiritreader commented Oct 6, 2021

Two things that are happening here:
The first one is that logon task on your system can't be set.
The account you use seems to have no privileges to set a task scheduler entry.

However, without logon task, the auto start entry appears to set without exeption, meaning that the registry key should in theory pop up.
Unless there is a permission issue there too, that, for some reason, does not throw an exception.

Since I cannot reproduce this on any test system, I can't say it's a definite bug and may be a permission issue (note: administrator rights.

The shell:startup shortcut would work, however, we would only want to resort to this measure, if we definitely know the auto start entry add method fails.

Can you check whether you can add auto dark mode via powershell?

Set-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce" -Name 'AutoDarkMode' -Value "${REPLACE_WITH_PATH_TO/AutoDarkModeSvc.exe}"

Replace the variable here ${REPLACE_WITH_PATH_TO/AutoDarkModeSvc.exe} with where the auto dark mode service is located, usually
C:\Users\${YOUR_USERNAME}\AppData\Local\Programs\AutoDarkMode\AutoDarkModeSvc.exe

If adding via powershell works, I will have to go through a few fixes probably to make it work,

@tellmewhy12
Copy link
Author

@Spiritreader Yes awesome, this worked! It opens in the tray now. I had to run PowerShell as Administrator, though.

@tooomm
Copy link
Contributor

tooomm commented Oct 6, 2021

I'm also having issues with the newest X release and auto start is not working for me.
I do use the portable version (zip file) on Windows 10.

On first launch after extraction to test if it runs at all...
It created a startup entry, that I see in the Task Manager / Autostart tab. But when I moved the folder to its final destination the entry probably did not adopt. I can not even tell if it would have worked without moving the folder.

End result: No auto start.

(In case this is better off in its own issue, please move it or let me know to recreate it)

@Spiritreader
Copy link
Member

I'm also having issues with the newest X release and auto start is not working for me. I do use the portable version (zip file) on Windows 10.

On first launch after extraction to test if it runs at all... It created a startup entry, that I see in the Task Manager / Autostart tab. But when I moved the folder to its final destination the entry probably did not adopt. I can not even tell if it would have worked without moving the folder.

End result: No auto start.

(In case this is better off in its own issue, please move it or let me know to recreate it)

It's kind of a not-issue, as this is expected behavior.
You can use adm portably, but when moving it you will have to migrate it.
Tracking executable location changes is not a planned feature. As such, when moving the executable, it is up to the individual user to handle this correctly.

You can reset the auto start entry by going to the time page in the app, select disabled, and then your previous setting again.

Alternatively, you can open the AutoDarkModeShell (found in the same directory), sending '--add-autostart'

@Spiritreader
Copy link
Member

Spiritreader commented Oct 6, 2021

@mangoepic Could you please download the newest beta build (update 10.0.1.14 should be available via the beta channel)?

I would like you to perform the following steps:

  • Close the service and app (right click tray icon, hit close)
  • delete service.log in %AppData%\AutoDarkMode
  • Open the service and app again
  • ensure that logon task is disabled
  • go to the Time page
  • Set to "disabled"
  • Set to anything other than disabled
  • close the service
  • open regedit, go to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and post a screenshot
  • Attach the service.log as a file

@tellmewhy12
Copy link
Author

tellmewhy12 commented Oct 7, 2021

  • Open the service and app again ℹ The App Updated to 10.0.1.14
  • ensure that logon task is disabled ℹ I reran as Administrator to prevent the error message
  • open regedit, go to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and post a screenshot
    image
    ℹ The key might be still from when I added it with PowerShell

I renamed the original key and did the steps again. It created the key AutoDarkMode again.

  • Attach the service.log as a file

service.log

@Spiritreader
Copy link
Member

Spiritreader commented Oct 7, 2021

Thank you very much!

The regkeys were set by adm both times.
The power shell instruction I sent to you put the entry into HKLM RunOnce as a test (a different location that only works once for testing purposes)

In case you want to know why I asked you to do this:

  • it helps to ensure that the auto start mechanism works fine, so no shell:startup required
  • it tells me where the issue is located exactly, which I will get into now:

So essentially, auto start works as expected.
I think I know what's going on now.
When the logon task is set and fails, it removes the autostart entry, There is no failsafe at the moment.

A behavior change is required to ensure the auto start entry is preserved when setting the logon task fails.

Spiritreader added a commit that referenced this issue Oct 7, 2021
- make the auto start setting more persistent if logon task fails  (#259)
- add more verbose error messages in app
- fix oversight in gpu monitoring module
@Spiritreader
Copy link
Member

Spiritreader commented Oct 7, 2021

I have made it a lot more difficult to enable the logon task when ADM has insufficient permissions to use the task scheduler, or it fails due to other reasons.

In addition, if the logon task operation errors, the auto start entry will no longer wrongfully be deleted.
Instead, an extra attempt will be made to reset/refresh it to ensure Auto Dark Mode still starts in this scenario.

This is available from build 10.0.1.17 onwards.
I will consider this closed for now, reopn if necessary.

@tooomm
Copy link
Contributor

tooomm commented Oct 8, 2021

I'm also having issues with the newest X release and auto start is not working for me. I do use the portable version (zip file) on Windows 10.
On first launch after extraction to test if it runs at all... It created a startup entry, that I see in the Task Manager / Autostart tab. But when I moved the folder to its final destination the entry probably did not adopt. I can not even tell if it would have worked without moving the folder.
End result: No auto start.
(In case this is better off in its own issue, please move it or let me know to recreate it)

It's kind of a not-issue, as this is expected behavior. You can use adm portably, but when moving it you will have to migrate it. Tracking executable location changes is not a planned feature. As such, when moving the executable, it is up to the individual user to handle this correctly.

You can reset the auto start entry by going to the time page in the app, select disabled, and then your previous setting again.

Alternatively, you can open the AutoDarkModeShell (found in the same directory), sending '--add-autostart'

Thanks for your explanation, that helped a lot. @Spiritreader
Disabling and re-enabling the schedule in the time menu made it work. I started the app with admin rights just to be sure. (Is that mandatory for this task btw?) The old, broken "iconless" entry is now updated in the Autostart section and launching with the OS works flawlessly.
Another observation: I think the false entry did not disappear when disabling the "time" setting at first. Maybe because the app was not at its old location when the entry got created? 🤔

I still think this is not self-explanatory and users could easily run into similar issues.
A portable app is likely to be moved around at one point and will always expose users to this - and people are not aware how to fix things then.

Throwing ideas here...
Did you consider placing a tickbox to enable/disable autostart for example? --> [ ] Enable Autostart
Or a refresh button? --> Refresh Autostart Entry
Or maybe add an educational hint on that page below the options? --> If you select "Disabled", the autostart entry of the app will get removed altogether. Selecting any other option will re-apply it.

Those could lead to a better interface and help the users solve potential problems on their own.

@Spiritreader
Copy link
Member

Spiritreader commented Oct 8, 2021

@tooomm
The iconless entry does not disappear, because @Armin2208 made it impossible for people to disable the autostart entry in the Version X App. It can only add, but not remove it. Every time you select an option other than "disabled", it will overwrite the entry (and in your case, fix it)

The only way to really remove it is by:

  • using the AutoDarkModeShell to send "--remove-autostart"
  • uninstall AutoDarkMode (uses the Shell)

The autostart setting is not tracked by auto dark mode itself, you can either send an "add it" or a "remove it" command to it and it will comply.

For your suggestions in general, please create a new issue for such ideas/improvements, as it is easier to track.
I've gone ahead and done that for you, you can track the progress of your idea here:
#293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants