2

请你帮助我好吗?

我需要的是一种在 Windows 机器上更改主题而不用显示属性(个性化)窗口提示用户的方法。主题更改应应用 c:\windows\resources\themes\ 目录中的 .theme 文件,而不是应用新的 .msstyles。方法应该只应用一个 .theme 文件。我只是无法找到一种方法来应用主题而不导致个性化窗口出现。强调一下,我不想通过脚本或宏来解决这个问题。而且,通过“sendkeys”关闭窗口不是一种选择,因为它仍然会在瞬间被看到。

也许有办法通过 WINAPI 函数或简单的注册表破解?请给我建议。谢谢你。

此致

4

2 回答 2

1
'Script name: yourtheme.vbs
'Object: Automate without command prompt the application of a Windows Theme by a VB script
'
'SCRIPT CONTENTS:
'Define Variables : 

    Set ShellApp = CreateObject("Shell.Application")
    Set WsShell = CreateObject("Wscript.Shell")


'
'Define path for your file theme (put it on a network share and don't forget to apply "read and execute" ACL for your Users)

    Theme = "typeyoursharepath\typeyourtheme.theme"
    Theme = """" + Theme + """"


'Open Display Properties Windows, Select your theme and apply with keep focus on Windows

    ShellApp.ControlPanelItem cstr("desk.cpl desk,@Themes /Action:OpenTheme /file:" & Theme)
    Wscript.Sleep 100
    WsShell.SendKeys "{ENTER}"
    While WsShell.AppActivate ("Display Properties") = TRUE
        WsShell.AppActivate "Display Properties"
    Wend

'In case of problem try to use a timeout value more important like "Wscript.Sleep 2000"
'END OF SCRIPT 

'NOTES:
'APPLIED SUCCESSFULLY ON WINDOWS XP AND WINDOWS SERVER 2003R2 X86   AND UNDER CITRIX XENAPP 4.6FP7 (OS: W2003R2X86 SP2) TO APPLY WINDOWS EMBEDDED THEME WITH BLUE BACKGROUND COLOR MORE LIGHT. 
'LOOKS GREAT ON CITRIX SESSION USER!
'INTEGRATED IN USER CONFIG GPO AT USER LOGON UNDER CITRIX XENAPP.
于 2012-01-28T13:30:43.460 回答
0

我认为没有一种本地方式可以静默更改 Windows 7(和 Windows 8)主题,但您可以尝试使用 winaero 主题切换器。你可以在这里阅读并下载它。

于 2013-04-09T06:49:20.207 回答