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

    • NetSpeedTray 1.3.2 by Razvan Serea NetSpeedTray is a lightweight, open-source Windows network monitor that shows live upload and download speeds directly on the Taskbar. Designed for efficiency, it quietly sits in the system tray, conserving CPU and battery with dynamic updates. It blends seamlessly with Windows 10/11, adapts to light/dark themes, and auto-positions to avoid overlaps. Features include accurate interface detection, customizable display, optional mini-graph, color coding, granular font and unit control, detailed per-interface history graphs, safe data management, and easy CSV export—bringing the network monitoring Windows forgot. NetSpeedTray key features: Lightweight & Efficient Runs quietly in your system tray without consuming resources. Features a "Dynamic Update Rate" that lowers refresh frequency when the network is idle to save CPU and battery life. Native Look & Feel Blends seamlessly with Windows 10/11 UI. Smart detection for light and dark taskbar themes ensures text is always visible. Intelligent & Adaptive Positioning Automatically finds empty space next to your system tray and shifts to make room for new icons, preventing overlaps. Seamless OS Integration Behaves like a native Windows component. Hides instantly with auto-hiding taskbar Hides when a fullscreen app is active Smart Network Monitoring Accurate by Default: Auto mode identifies your main internet connection and ignores noise from VPNs or virtual adapters. Easy Interface Selection: Switch effortlessly between Auto, All, or Selected network interfaces via intuitive radio buttons. Total Visual Customization Free Move Mode: Unlock and place the widget anywhere on your screen. Optional Mini-Graph: Real-time graph of recent network activity with adjustable opacity. Color Coding: Customize colors and speed thresholds to quickly see network status. Granular Display Control Text & Font: Adjust font family, size, weight, and alignment. Units: Automatic (B/s, KB/s, MB/s) or fixed Mbps display. Precision: Set decimal places and always show them for uniform appearance. Detailed & Intelligent History Graph Smart Scale: Logarithmic scale shows low-level traffic and large spikes clearly. Per-Interface Filtering: View speed history for specific adapters (Wi-Fi, Ethernet, VPN). Safe & Efficient Data Management: Adjustable retention, automatic cleanup, optimized database. Easy Data Export: Export raw data to .csv or save high-quality graphs for reports. NetSpeedTray v1.3.2: Smaller, Lighter, Better Multi-Monitor NetSpeedTray v1.3.2 focuses on being smaller, lighter, and more reliable, with major memory savings, better multi-monitor support, stronger privacy protections, and easier troubleshooting. Changes 24% smaller installer (106 → 81 MB) 28% smaller portable ZIP (127 → 91 MB) 45–70% lower idle RAM usage (~135 MB → ~40–75 MB) Preferred Monitor setting for multi-monitor setups (#72) Export Support Bundle for one-click bug-report packaging Live Windows Light/Dark theme detection (#62) Lazy loading of matplotlib & numpy for faster, lighter startup Improved multi-monitor widget position restore after reboot (#133) Windows 10/11 stylesheet and font compatibility fixes (#149) Support Bundle includes sanitized logs, config, and system info PII obfuscator hardened to cover IPv6, MACs, hostnames, GUIDs, and paths (#141) Unified log redaction across file and console logging Better diagnostic logging included by default in support bundles Korean translation improvements and updated translator credits (#139) Test suite expanded from 146 → 191 passing tests (+45) [full release notes] Download: NetSpeedTray 1.3.2 | 81.6 MB (Open Source) Download: NetSpeedTray Portable | 91.1 MB View: NetSpeedTray Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Reluctantly..bs. In this day and age(pun intended) information is more valuable then apps; big tech worked with the GOP and in dem states like California to add this crap so they can agro better marketing data.
    • >Under 13, 13-15, 16-17, or 18+ Or as the Texas GOP likes to call them... Under 13: Priest-bait 13-15: "Want to meet a prince?" - Epstein and Trump 16-17: "Totally legal!" - Megyn Kelly 18+: Public-facing Breeder Wives
    • An excellent piece of hardware held back by its OS
  • Recent Achievements

    • 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
    • One Year In
      MadMung0 earned a badge
      One Year In
    • Week One Done
      jefred earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      473
    2. 2
      PsYcHoKiLLa
      232
    3. 3
      Skyfrog
      79
    4. 4
      FloatingFatMan
      68
    5. 5
      Michael Scrip
      58
  • Tell a friend

    Love Neowin? Tell a friend!