How do I change the current Windows theme programmatically?

前端 未结 12 1983
轻奢々
轻奢々 2020-12-04 11:12

I want to allow my users to toggle the current user theme between Aero and Windows Classic(1). Is there a way that I can do this programatically?

I don\'t want to po

12条回答
  •  星月不相逢
    2020-12-04 12:04

    I just realized you can double click the theme and it autoswitches it - much simpler, so just executing the theme works, ex batch file:

    :: Reactivate my theme after an remote desktop session
    :: We must select another theme first before we can select ours again and hence re-activate Aero, please wait..."
    @echo Off
    "C:\Windows\Resources\Themes\aero.theme"
    ::echo "Simulating a pause while"
    ping 127.0.0.1 -n 10 > null && "D:\Users\danielsokolowski\Windows 7 Aero Themes\`danielsokolowski` Theme (without Glass).theme"
    ::or ping 127.0.0.1 -n 3 > null && "%userprofile%\AppData\Local\Microsoft\Windows\Themes\`danielsokolowski` Theme (without Glass).theme"
    

提交回复
热议问题