在Windows10中,有没有办法使用命令行(以编程方式)应用给定的.theme或.themepack文件?在Windows7中,我可以使用类似这样的东西:rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Themes\aero.theme",但在Windows10中,这将打开另一个对话框。
另外,有没有办法在Windows10的命令行中更改桌面墙纸?
发布于 2016-07-01 15:01:45
你可以直接执行你的主题文件:
x:>path到您的主题file.theme
发布于 2020-09-08 19:20:27
当我希望对我公司的计算机映像做同样的事情时,我遇到了这个问题。下面的命令对我来说工作得很好,记住taskkill部件会杀死所有设置窗口
C:\PATH\TO\THEME\FILE.theme & timeout /t 03 /nobreak > NUL & taskkill /f /im systemsettings.exe
这将启动主题文件,它将应用主题,但也会打开设置应用程序/窗口,但它将等待超时(在上面的命令中设置为3秒),然后终止设置应用程序/窗口。
已在Windows10企业版x64 v1909上进行测试。此外,根据计算机的性能,您可以将超时时间从3秒降低到3秒。
发布于 2021-04-08 04:49:26
如果你发现这个问题是为了寻找在Windows10中切换亮/暗模式而不改变主题的方法,那么this answer in the "Win 10 forums"将解释如何使用powershell来做到这一点:
轻量级应用模式
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force黑暗应用程序模式
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force轻量级操作系统模式
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1 -Type Dword -Force深色操作系统模式
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Forcehttps://stackoverflow.com/questions/32045681
复制相似问题