【问题标题】:VBScript check current Windows themeVBScript 检查当前 Windows 主题
【发布时间】:2023-04-03 07:04:01
【问题描述】:

我已经编写了以下 VBScript,它将 Windows 主题更改为默认的 Windows 主题,但是即使 Windows 主题已经是默认的 Windows 主题,它也会触发。

如何添加一些逻辑来检查当前的 Windows 主题是否不是默认的 Windows 主题,如果是则什么都不做?

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "C:\Windows\Resources\Themes\aero.theme"

For i = 1 To 10

    WScript.Sleep 1000

    If WshShell.AppActivate("Personalization") Then
        WshShell.Sendkeys "%FC"
        WshShell.Sendkeys "{F4}"
        Exit For
    End If

Next

【问题讨论】:

    标签: windows vbscript


    【解决方案1】:

    据我所知,您可以在以下注册表中检查:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes
    

    值:当前主题

    最好的问候

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-10
      • 1970-01-01
      • 1970-01-01
      • 2011-04-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-02
      相关资源
      最近更新 更多