Change Theme with RunDll32

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 03 May 2017, 08:14
Facebook: Kristofer Borvall
Google: Kristofer Borvall
GitHub: Kristofer

Change Theme with RunDll32

03 May 2017, 08:26

I'm trying to get this one going, but runwait wont make it.
Any ideas on how to change the line?

RunWait rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Ease of Access Themes\classic.theme"

By reading the instructions I came up with this line, it loads the desk.cpl but not the action of changing theme.
Run rundll32.exe shell32.dll`,Control_RunDLL desk.cpl %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Ease of Access Themes\classic.theme"
Posts: 468
Joined: 04 Mar 2016, 04:33
GitHub: qwerty12

Re: Change Theme with RunDll32

03 May 2017, 14:17

You haven't said what version of Windows you're running, so I'll take the liberty of assuming Windows 10 with the Creators Update. If that is the case, then you're not actually doing anything wrong - support for the OpenTheme action was seemingly removed in the latest update; here's a quick comparison of 10's desk.cpl with Windows 7's:
[[email protected] ~] λ strings C:\Windows\System32\desk.cpl | grep OpenTheme

[[email protected] ~] λ strings C:\Users\Me\Desktop\desk.cpl | grep OpenTheme
See - no results with Windows 10's desk.cpl.

You can do (easier):
Run C:\Windows\Resources\Ease of Access Themes\classic.theme


assuming you're not tmp, try my code here: ... 548#p91548. Yes, it makes use of an undocumented interface, but that, unlike asking desk.cpl, still continues to work from Windows 7 to the current version of Windows 10...

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot] and 48 guests