Changing visual styles from the command line?


Recommended Posts

Hello! I've just registered in this Forum, and as my first post, I wanted to make a question... It may seem difficult, or maybe strange, but I really need it, and, searching through the Forum, I've noticed that it was answered before. Sadly, the users who answered the question, pointed to an external page that now leads to a broken link...

So, I'll ask: Can you tell me how to change a visual style via the Command line or through a script?

Please, don't answer with things like: "Go to Screen properties and change the style from there", or "use Style XP, WindowsBlinds, etc..." I know perfectly how to use these programs, but now I need to know how to change it via a script or command.

Let me explain you: I'm curretly working on a shell theme for bblean (one of the BlackBox shell branches), making use of its new features. between one of them it's the ability to send commands to the windows core, and also, execute TCL-based scripts... So, I thought that it could be a great idea to create a matching visual style that could handle my windows and some other Explorer things, for each of my bblean Styles. Right now, I have both set of styles, and although changing them manually would be an alternative, I'd like to use an automatized way. I know it's possible, it was answered in this Forum some time ago. Thanks.

simple, change a few registry values.

[HKLM|HKCU]\software\microsoft\windows\currentversion\theme

String name:InstallTheme

Default String value: %resourcedir%\themes\luna.theme

String name:InstallVisualStyle

Default String value: %resourcedir%\themes\luna\luna\luna.msstyle

You can do this with the REG command.

Thanks to both of you... but I think that none of this solutions have worked fine for me. The one suggested by bigflavor seemed to be the most practical one, but then I discovered that, after updating in the registry, you must reboot in order to the change to take effect... :(

The program suggested by Herby was pretty useful, but it only throws up the Screen properties dialog with the theme you choose selected. The user still has to press the "Apply" button to execute the change.

Well, this wasn't exactly what I meant, but if I can't get any other solution to this issue, maybe I'll get along with Herby's solution, after all, I think that just a click isn't a great thing to do, after all.

Thanks again, I hope that someone could tell me if MMStlyler (the program I heard about in the other topic) can deal with the visual style change automatically.. or maybe any other solution.

I found a vbs file that does the trick @ gfxOasis :)

ApplyStyle.vbs

filename = "%WinDir%\Resources\Themes\Royale\Royale.msstyles"

delay = 300
myfile = Chr(34) & filename & Chr(34)

set DShell = CreateObject("WScript.Shell")

DShell.run "Rundll32.exe Shell32.dll,Control_RunDLL Desk.cpl Desk,@Appearance /Action:OpenMSTheme /file:"&myfile, 2
WScript.Sleep delay
DShell.SendKeys "{ENTER}"

ApplyTheme.vbs

filename = "%WinDir%\Resources\Themes\Royale.Theme"

delay = 300
myfile = Chr(34) & filename & Chr(34)

set DShell = CreateObject("WScript.Shell")

DShell.run "Rundll32.exe Shell32,Control_RunDLL Desk.cpl Desk,@Themes /Action:OpenTheme /file:"&myfile, 2
WScript.Sleep delay
DShell.SendKeys "{ENTER}"

ApplyStyle.zip

And to compliment those scripts:

You can use the following examples to replace the line that sets the filename (filename = "%WinDir%\Resources\Themes\Royale.Theme").

Change the word theme to style and replace in ApplyStyle.vbs.

Change 1:

The syntax would be ApplyTheme theme=[THEMEFILE].theme

filename = Wscript.Arguments.Named("theme")

Change 2:

The syntax would be ApplyTheme [THEMEFILE].theme

filename = WScript.Arguments.Item(0)

:rofl: flame.gif

http://www.microsoft.com/technet/scriptcen...a.mspx?mfr=true

Wow! :yes: This is exactly what I was looking for! It's simple, discrete, and does its work nicely! Now, i'm even thinking on setting up a routine through TCL to dinamically create the .vbs file, so I won't need to create one for every visual style... Well, maybe I'm going too far, but I'm really amazed that you could be able to find it, thanks Herby!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I don't understand the vision. Do people really want to buy a new computer from Dell with 6 browsers installed? We all keep asking for Microsoft to stop having so much junk on their OS, and adding a bunch of browsers seems to go against that. Ideally, we would just be asked what browser we want during OOBE but Google is just going to pay Dell a bunch of money to include Chrome. Additionally, would you want your phones to start including all the browsers too when you get them? The only thing I ever wanted was to be able to uninstall IE or edge and I believe you are now able to. I do agree that microsoft needs to chill with their "are you sure you don't want to try edge before you install chrome" ads when going to download chrome.
    • The funny thing here is that like 70% or so of the web browser users use 'Google Chrome' as web browser. What I don't understand is that why on earth would ANYONE choose 'Google Chrome' on Windows when 'Microsoft Edge' is not just better in most things, but it's already there right out of the box for the Windows users. Microsoft Edge has less data collection (yes, that's a fact), less RAM usage and is more optimized for Windows (as it's a Microsoft product) right out of the box. I'm sure you will come with the argument of bloat in Microsoft Edge. Sure, but most of that can be fixed with a simple tool (there are many good ones out there for this). Yes, that require a couple of clicks in the same way as it requires several clicks to install 'Google Chrome'. And I'm sure you really love the 4 GB of AI-slop data 'Google Chrome' is downloading for Chrome without you agreeing to it. Fun right? Sure, the way Microsoft is pushing 'Microsoft Edge' on users might not be the best way of doing it and might need to change. But I would never choose 'Google Chrome' over 'Microsoft Edge' today anyways. I'm sure there was a period back in the days when 'Google Chrome' actually was better in most things, but that period is not today.
    • JetBrains rolls out IntelliJ IDEA update with Markdown preview fixes and more by David Uzondu Image via JetBrains IntelliJ 2026.1.3 from JetBrains has landed, bringing several highly requested bug fixes that target common UI glitches and terminal rendering issues. If you run tmux inside the integrated terminal, the IDE no longer renders the cursor above the active line. The Markdown preview bug, which was fixed in this release, had annoyed developers for quite some time, as the preview pane failed to render images saved outside the project directory. Instead of displaying the actual image, the IDE simply showed a broken image icon, a problem that stuck around for two years before this update. Over on Windows, developers running WSL can now use wsl.exe to spin up their environments without losing terminal functionality. In previous builds, launching a terminal shell with something like wsl.exe -d ubuntu inside a Windows-based project broke both shell integration and active process detection. Other bug fixes in this release include: An issue where Gradle sync incorrectly reported success as a failure on WSL when using Gradle 9.5.0. A syntax highlighting bug that flagged valid Java for-loop initialization blocks with multiple statements as incorrect. A warning bug that triggered a false non-null local variable alert when using JSpecify annotations. A database generation bug that hid the option to use a DELETE statement instead of a TRUNCATE checkbox. A Kotlin highlighting failure where an assertion error in the Gradle redundant library inspection broke error highlighting. A UI bug where the ComboBox popup lacked a maximum height restriction. A Snowflake syntax error where DataGrip failed to support the "create temp" command. A Svelte syntax parsing failure that incorrectly flagged quotes inside inline expressions. A VCS repository manager deadlock that triggered thread pool exhaustion. A memory leak where the LazyTree component kept all previous versions of a tree in memory. IntelliJ 2026.1.3 is the third bug fix release for the IntelliJ 2026.1 series. The first one landed back in April with a fix for the WSL Python interpreter freeze, another fix for guest participants using Emmet abbreviations, and corrected WildFly server deployment errors.
    • That stupid annoying Sign in with Google on all these sites now... get the fk outta here
  • Recent Achievements

    • Collaborator
      Asgardi earned a badge
      Collaborator
    • Conversation Starter
      mobandz earned a badge
      Conversation Starter
    • Apprentice
      fernan99 went up a rank
      Apprentice
    • One Month Later
      nothanks earned a badge
      One Month Later
    • One Month Later
      B2Proxy earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      469
    2. 2
      PsYcHoKiLLa
      243
    3. 3
      Skyfrog
      79
    4. 4
      FloatingFatMan
      73
    5. 5
      Michael Scrip
      60
  • Tell a friend

    Love Neowin? Tell a friend!