(在Windows XP或Windows 7中无提示更改主题)

问题描述 投票:2回答:3

您能帮我吗?

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

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

最诚挚的问候

windows winapi user-interface registry windows-themes
3个回答
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.

0
投票

我不认为有一种原生方法可以无声地更改Windows 7(和Windows 8)的主题,但是您可以尝试使用winaero主题切换器。您可以阅读并下载here


0
投票

单击此链接:

https://www.codeproject.com/Articles/20497/Draw-Skin-Window-Using-Pure-Win32-API

在此页面中是要下载的项目示例。

© www.soinside.com 2019 - 2024. All rights reserved.