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

综合技术   © 文章版权由 admin 解释,禁止匿名转载

#楼主# 2021-11-28

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

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

成为第一个回答人

评论

登录后才可发表内容
  • 主题

    7

  • 帖子

    66

  • 关注者

    0

Copyright © 2019 凯特网.   Powered by HYBBS 2.3.4  

Runtime:0.5886s Mem:2040Kb