-
创建ps脚本
晚18-早7_使用暗色主题.ps1
#建议保存编码为:bom头 + utf8
#晚7点到早7点 暗黑其他时间 light就行
${script:现在} = Get-Date
if ( (${script:现在}.Hour -ge 19) -or (${script:现在}.Hour -le 7) )
{
#晚间
#(Dark)
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Force
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
}
else
{
#白天
#(Light)
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1 -Type Dword -Force
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force
} -
创建任务计划
