我需要的是一种在Windows机器上更改主题而不提示用户显示属性(个性化)窗口的方法。 themechange应该应用c:\ windows \ resources \ themes \目录中的.theme文件而不应用新的.msstyles。方法应该只应用.theme文件。我一直无法找到一种方法来应用主题而不会导致个性化窗口出现。要强调,我不想通过脚本或宏来解决这个问题。此外,通过“sendkeys”关闭窗口不是一个选项,因为它仍然会被暂时看到。
也许有通过WINAPI功能或简单的注册表黑客出路?拜托,给我建议。谢谢。
祝你好运
答案 0 :(得分: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.
答案 1 :(得分:0)
我认为没有一种原生方式可以默默地更改Windows 7(和Windows 8)的主题,但您可以尝试使用winaero主题切换器。您可以阅读并下载here。