你能帮我一下吗?
我需要的是一种方法来改变Windows机器上的主题,而不提示用户显示属性(个性化)窗口。theme更改应该应用c:windowsresourcesthemes目录下的。theme文件,而不是应用新的。msstyles。方法应该只应用.theme文件。我一直无法找到一种方法来应用主题,而不会导致个性化窗口出现。要强调的是,我不想通过脚本或宏来解决这个问题。而且,通过"sendkeys"关闭窗口不是一个选项,因为它仍然会被暂时看到。
也许有一个出路通过WINAPI函数或简单的注册表破解?请给我一些建议。谢谢你。
'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 = "typeyoursharepathtypeyourtheme.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.
我不认为有一种原生的方式来默默地改变Windows 7(和Windows 8)的主题,但你可以尝试使用winaero主题切换器。你可以在这里阅读和下载