在 Windows XP 或 Windows 7 中更改主题(静默)

发布于 2024-11-30 02:55:08 字数 314 浏览 0 评论 0原文

请你帮助我好吗?

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

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

此致

could you please help me?

What I need is a method to change the theme on a Windows machine without prompting the user with the display properties (personalization) window. The themechange should apply a .theme file from the c:\windows\resources\themes\ directory and NOT apply a new .msstyles. Method should only apply a .theme file. I have just been unable to find a way to apply the theme without causing the personalization window to appear. To emphasize, I dont want to solve this via scripts or macros. And also, closing the window via "sendkeys" is not an option, because it will still be seen momentarily.

Maybe there is a way out through WINAPI function or simple registry hack? Please, give me advice. Thank you.

Best regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

挖鼻大婶 2024-12-07 02:55:08
'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.
'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.
浮萍、无处依 2024-12-07 02:55:08

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

I don't think there is a native way to change Windows 7's (and windows 8's) theme silently, but you can try to use winaero theme switcher. you can read about and download it here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文