无名 发表于 2022-5-8 15:22:15

任务计划修改win10明亮暗黑主题模式

[吐舌][吐舌][吐舌][吐舌]
创建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
}

创建任务计划
[吐舌][吐舌]

http://cdn.u1.huluxia.com/g4/M02/0E/47/rBAAdmGjGbaAYw6cAAPuoVxKMhA967.jpghttp://cdn.u1.huluxia.com/g4/M02/0E/47/rBAAdmGjGbeAL6YiAALrJ2nWHRM581.pnghttp://cdn.u1.huluxia.com/g4/M02/0E/47/rBAAdmGjGbiACzwUAAA6-fIylgg561.jpg
页: [1]
查看完整版本: 任务计划修改win10明亮暗黑主题模式