Archive: Open Display Properties and select a theme


Open Display Properties and select a theme
I'm making a theme for WinXp, and I'm almost finished... I have made a simple installer, but after copying the files I want it to open Display Properties and select my theme there, so that all the user have to do is to press ok. Is this possible?

btw, nsis rocks, I have used it as an installer for many of my apps...


[edit] Ouch! I am truly stupid... There was an easy solution for this... All I had to do was to execute the .theme file... Moderators are welcome to delete this thread if they want to...[/edit]


Why delete it? Someone else can find the answer here :)

Have you used ExecWait or ExecShell?


I used ExecShell because Exec and ExecWait did not work...

Another question, how can I make the installer launch the theme when the user clicks "Finish"? Right now the theme is launched after the installer has copied the files, as a part of the general install section...


In one of my apps I call the display too... But don't know YET
how to open an select item, check this code:


OutFile "OpenCPL.exe"
Name "OpenCPL"

ComponentText "Hello"

Page components
Page instfiles

Section "Open Themes"
ExecShell "open" "rundll32.exe" "shell32.dll,Control_RunDLL themes.cpl,,2"
Quit
SectionEnd

Section "Open Appearance"
ExecShell "open" "rundll32.exe" "shell32.dll,Control_RunDLL desk.cpl,,2"
Quit
SectionEnd

Hmmm... to achieve that i think there's an event called something like

.onInstallSuccess or something like that, I can't look it up in the documentation right now, but it exists in the scripting reference I think :P :D


Well...
it's only an example of the calling
of the control panel's Display...
but you can put something like this

Function ".onGUIEnd"
ExecShell "open" "rundll32.exe" "shell32.dll,Control_RunDLL themes.cpl,,2"
FunctionEnd