Skip to content
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

Boot self-start autodarkmode not working #796

Closed
Qing90bing opened this issue Nov 11, 2023 · 7 comments
Closed

Boot self-start autodarkmode not working #796

Qing90bing opened this issue Nov 11, 2023 · 7 comments

Comments

@Qing90bing
Copy link

Description

动画

Expected Behavior

No response

Log Data

service.log
config.zip

Commit Hash, Version and Windows Build

版本 Windows 11 专业版
版本 23H2
安装日期 ‎2023-‎09-‎08
操作系统版本 22635.2700
体验 Windows Feature Experience Pack 1000.22678.1000.0

Screenshots / Videos

No response

@Spiritreader
Copy link
Member

Auto Dark Mode is not allowed to modify registry keys on your system

2023-11-11 11:31:46 | Error | RegistryHandler.AddAutoStart: could not add service to autostart UnauthorizedAccessException > Attempted to perform an unauthorized operation. > Void Win32Error(Int32, System.String)

Do you have any restrictions in place that would prevent you from performing such an operation?

@Qing90bing
Copy link
Author

I'm not sure, I tried to add a registry startup item but it didn't work

@Spiritreader
Copy link
Member

Spiritreader commented Nov 28, 2023

I'm not sure, I tried to add a registry startup item but it didn't work

First, please try out the latest beta build 10.4.2.1
If you can't use the updater, you can find the zip file here: https://github.com/AutoDarkMode/AutoDarkModeVersion/releases/tag/10.4.2.1

Also, could you check if this regkey here

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

exists by opening regedit and navigating to it?


If that doesn't work, you can try the following:

Could you try switching over to the task based start mode?
image

If the UI doesn't work, you can do this by opening the config file (scroll further down on the settings page, there is a link there. Then change this):

In the Tunable section change this

Tunable:
   UseLogonTask: true

And then enable autostart at the top of the config file by setting

Autostart:
  Validate: true

Then, restart the Auto Dark Mode Service by clicking on the tray icon in the bottom right, and selecting "Close". Afterwards launch the Auto Dark Mode App again. It's important that you quit Auto Dark Mode from the tray icon.
image

Afterwards it should look something like this:
image

Spiritreader added a commit that referenced this issue Nov 28, 2023
@Qing90bing
Copy link
Author

Hello, after using your method, the problem was solved,
image
In fact, after this problem appeared, I first used the "Task Planner", added AutoDarkModeSvc.exe to solve the problem, you may give a better answer than me.

@Spiritreader
Copy link
Member

Great to hear!

There's still an issue with the selection being grayed out and not selectable from the user interface if the normal startup method is not available.

I sadly can't say why there's a permission issue on your system. I've attempted to fix it by checking if the registry key actually exists, maybe that was the issue.

@Qing90bing
Copy link
Author

It's okay, the problem has been solved. This can be considered a solution, right。

@Spiritreader
Copy link
Member

Alright, thanks for letting me know! closing this, feel free to reopen if you experience issues again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants