this is a little old topic but I'd like to share my (partial but ok I guess) solution:
create a couple of scheduled tasks:
Light theme
Program:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent -Name AccentColorMenu -Value 0 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent -Name AccentColorMenu -Value 0xff1d3f58 -Type Dword -Force
Dark Theme
Program:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent -Name AccentColorMenu -Value 0 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent -Name AccentColorMenu -Value 0xff1d3f58 -Type Dword -Force
Especially the following:
New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent -Name AccentColorMenu -Value 0 -Type Dword -Force; New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent -Name AccentColorMenu -Value 0xff1d3f58 -Type Dword -Force
allowed me to force the change of the taskbar from light to dark but apparently with a little quirk: the second display taskbar does not switch to the actual color but stays on the previous one, who knows why, on the primary display it works fine so if you have one display you should have no problem.
If anyone can help fixing this it would be nice