Windows 10: apply windows 10 theme with cmd or powershell / programming Solved

  1.    24 May 2016 #1

    apply windows 10 theme with cmd or powershell / programming

    Hi All,

    I develop the company image and I'm trying to apply a theme with wallpaper and accent color. In the Windows 7 days this VBS line worked for me:

    WshShell.Run "rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk @TheMes /Action:OpenTheme /file:""C:\Windows\Resources\Themes\HHMX.deskthemepack"""

    However when I run this on Windows 10 it doesn't work. Running the following line opens the theme selection window:

    rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk @TheMes

    But the "/Action:OpenTheme" part doesn't work anymore. Does anyone have any suggestions to make this work? Or any other ways. I don't want to lock the theme down with GPO (users complain), and I've tried adding the theme name to my answer file during sysprep, but that also is not working. If anyone has any guidance on apply a theme via an answer file that would be great too. Thanks for any help!
    Last edited by a1manarme; 24 May 2016 at 10:16.
      My System SpecsSystem Spec

  2.    24 May 2016 #2

    Hi, for what it's worth (= not an exact answer), here's how I do it from within an AHK script:
    run, "D:\GUI tweaks\Theme Switcher\ThemeSwitcher\Themeswitcher.exe" "Paler yellow, blue-green title.theme"
    Themeswitcher.exe is a tool produced by Winaero
    Winaero Theme Switcher
      My System SpecsSystem Spec

  3.    26 May 2016 #3

    Thanks for your reply. I'd rather not use a tool like that. Also my companies firewall blocks anything from winaero. What is interesting is if I simply execute a theme file using CMD it changes the theme, but when I put it in a script, it doesn't work. Sadness.
      My System SpecsSystem Spec

  4. Kari's Avatar
    Posts : 9,985
    Windows 10 Pro
       26 May 2016 #4

    Just to customize the default user profile, including customizing the theme and other visuals, see this tutorial: Default User Profile - Customize in Windows 10 - Windows 10 Forums

    To completely customize your Windows image in Audit Mode with sysprep, see this tutorial: Windows 10 Image - Customize in Audit Mode with Sysprep - Windows 10 Forums

      My System SpecsSystem Spec

  5.    26 May 2016 #5

    Thanks! Is there any elegant way to enter audit mode after I've already started to set up my image under the local admin? Do I sysprep /audit without answer file into audit mode, make customizations, then sysprep /oobe /unattend ? Thanks for your help!
      My System SpecsSystem Spec

  6. Kari's Avatar
    Posts : 9,985
    Windows 10 Pro
       26 May 2016 #6

    WIN + R, type %windir%\system32\sysprep\sysprep.exe /audit /reboot, hit Enter to restart in Audit Mode.

    Notice that as you already have existing user accounts, all customizations will only apply to new user accounts, not existing ones.
      My System SpecsSystem Spec

  7.    03 Jun 2016 #7

    I ended up using the solution provided by dalchina, thank you.
      My System SpecsSystem Spec


Related Threads
Hi guys, so a few days ago my windows 10 crashed so I had to format and reinstall windows 7 then upgrade to windows 10, a hard work to do. So I started to search about how to capture the image of C: where the windows 10 is running and I found Dism....
How to Apply a Folder's View to All Folders of Same Template Type in Windows 10 While browsing folders in File Explorer, you can apply the view settings of the current folder to all folders on your PC that are optimized for the same folder...
Please advise on a forum for Windows 10 programming. I'm looking to both re-write apps for desktop and new apps for my Windows Phone. Having used C for most of my life I'm now progressing to C# and XAML.
Programming Chalagens in Chillout Room
I've been doing these in Python but any language can be used. 1. love6 Solution in Python version 2.7.9 def love6(a, b): if (a == 6 or b == 6): return True elif (a + b == 6):
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:40.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App

Windows 10 Forums