2

I am in the process of building a custom Windows 10 media PC for church. I would like the users to have a color scheme and background that corresponds to the liturgical color for that service (so if the altar is draped in purple, the computer theme is also purple). One computer will calculate the appropriate color based upon the liturgical calendar and any church events (for example: a baptism, wedding, or funeral service) and act as the "server" for this information to all of the rest of the systems. My plan is to save themes for each color while configuring the system. I am having difficulty finding an automated way on login and periodically throughout the day to change the entire theme (not just the background), and specifically one that would not require administrative privileges. Since many people without significant computer knowledge will be using this PC, and to follow best practices, the main account must be user-level privileges only with a few select administrators from the congregation staff/ volunteers.

After review of the prior relevant work here (much of which is many years old):

Location based windows theme - the best comment changes only the screensaver.

Windows Color Scheme (Theme) Program - the recommended software is for much more UI customization (per-application skins, custom fonts, etc.), which is way more than what I want and would likely confuse people. Also, the need is for programmatic control of the theme and this requires user action.

Automatically recognize desktop background image has changed - this seems to be potentially useful as a starting point, but it requires administrative privileges.

Pseudocode:

    Sub onUserLogin()
    {
        coordinateLiturgicalColor(); ' Check (and set) current color
        bindTimerEvent();            ' Set timer to fire subroutine at x:00 and x:30
    }

    Sub coordinateLiturgicalColor()
    {
        currentColor = currentTheme.name();
        newColor = getColor("https://192.168.1.200/color.php");
        if (currentColor != newColor)
        {
            currentTheme.name = newColor;
            currentTheme.refresh();
        }
    }
1

You could use .theme files for this, since they are installed by simply executing them and can change colors and many other things. And especially, they can be installed by any user without requiring administrator privileges.

For example, you could prepare your themes on your computer. Any changes you make are recorded in the file C:\Users\USERNAME\AppData\Local\Microsoft\Windows\Themes\Custom.theme, or you could save the theme under some name.

You could copy the themes to some network share on your computer or any central server. You would install the themes via tasks defined via the Task Scheduler, which will just install the theme of the day (or hour) as you programmed.

Another of your problem is choosing Light or Dark theme color for Default App Mode.

This is not in a theme but is found in the registry at key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize, value named AppsUseLightTheme (DWORD), where 0 is for Dark theme and 1 for Light theme. I don't know if this change requires restarting Explorer or logout/in.

The following .reg file will install Light mode:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize]
"AppsUseLightTheme"=dword:00000001

For more information see the article
How to Change Default App Mode and Windows Mode to Light or Dark Theme Color in Windows 10.

4
  • This gets me about 85% of the way to where I need to be, but there is one theme that requires the "default app mode" to toggle from light to dark, and there seems to be a lack of Microsoft references on how to do that in the .theme file (or really how to do anything in a .theme file aside from their single "overview" article). Manually setting it, going to a different theme it stays as "dark" mode in the new theme that should be "light" mode.
    – RudyB
    Sep 2 '19 at 16:46
  • 1
    I added info for that as well.
    – harrymc
    Sep 2 '19 at 16:56
  • I appreciate the additional information, however .reg files require administrative privileges, so at the moment I am still stuck on the light/ dark aspect, but I agree this does answer what I had asked initially. Thanks!
    – RudyB
    Sep 2 '19 at 17:07
  • 1
    If you wish to switch it then admin privileges are required, but if you use the Task Scheduler then this is not a problem. This is a new option in Windows, so I assume it will move to the theme file sooner or later.
    – harrymc
    Sep 2 '19 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.