Search code examples
c#windowscommand-linewindows-8windows-8.1

How to change the current Windows theme programatically in windows 8.1?


From Windows XP to Windows 7, you could change the current the with the command line: (How do I change the current Windows theme programmatically?). But in Windows 8.1 (and windows 8 I suppose), it doesn't work.

The only way I can do it is with WinaeroThemeSwitcher (http://winaero.com/comment.php?comment.news.209).

How can I do it from native commands or from C#? WinaeroThemeSwitcher proves that it is possible.


Solution

  • I finally found how. Using ILSpy (with few corrections) helped a lot. Thank you magicandre1981.

    I also found an implementation online afterwards using COM objects GUID (class ThemeManagerHelpClass):

    https://github.com/opkorz/CS199_Thesis/blob/master/Implementation1/CL_Utility2.ps1