Vexelius Posted August 10, 2006 Share Posted August 10, 2006 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. Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/ Share on other sites More sharing options...
brand Posted August 10, 2006 Share Posted August 10, 2006 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. Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587773910 Share on other sites More sharing options...
Herby Posted August 10, 2006 Share Posted August 10, 2006 ^^ Yup,.. that or,.. uhmmm, check here. ;) Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587773987 Share on other sites More sharing options...
brand Posted August 10, 2006 Share Posted August 10, 2006 Herby... you flaming monster! Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587774042 Share on other sites More sharing options...
Herby Posted August 10, 2006 Share Posted August 10, 2006 Herby... you flaming monster! :p :D Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587774320 Share on other sites More sharing options...
Vexelius Posted August 10, 2006 Author Share Posted August 10, 2006 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. Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587774357 Share on other sites More sharing options...
Herby Posted August 10, 2006 Share Posted August 10, 2006 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 Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587774733 Share on other sites More sharing options...
brand Posted August 11, 2006 Share Posted August 11, 2006 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: http://www.microsoft.com/technet/scriptcen...a.mspx?mfr=true Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587774948 Share on other sites More sharing options...
Vexelius Posted August 11, 2006 Author Share Posted August 11, 2006 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! Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587775001 Share on other sites More sharing options...
dreamz Veteran Posted August 11, 2006 Veteran Share Posted August 11, 2006 wow, very cool, guys. (Y) Link to comment https://www.neowin.net/forum/topic/485494-changing-visual-styles-from-the-command-line/#findComment-587776552 Share on other sites More sharing options...
Recommended Posts