gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 10:39:30 26 4
gpt4 key购买 nike

你能帮帮我吗?

我需要的是一种无需使用显示属性(个性化)窗口提示用户即可在 Windows 机器上更改主题的方法。主题更改应应用 c:\windows\resources\themes\目录中的 .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 = "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.

关于windows - 在 Windows XP 或 Windows 7 中更改主题(静默),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7114747/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com