Author Topic: Unattend: How to install a custom theme  (Read 2324 times)

gosh

  • Guest
Unattend: How to install a custom theme
« on: December 03, 2002, 01:08:14 AM »
One thing i\'ve always wanted to do with an unattended install was to use a custom 3rd party theme.  I searched newsgroups and found jack squat.

Well here\'s how to do it.

First, you need to slipstream a hexed uxtheme.dl_.  The only place i\'ve found one is www.windowsxpstuff.net .  Put this in the i386 folder.

Next, we need to do an oem preinstall.

In the unattend file under [unattended] make sure you have this:

    OemPreinstall=Yes
    OemSkipEula=Yes
    DriverSigningPolicy=Ignore

If your installing from CD, on the root of the CD you need to make an $OEM$ folder.  In this folder make another folder called $$.  Then in the $$ folder make another folder called Resources, then another folder called Themes.  In the themes folder put the theme you want to use.

For example if you want to use coco.theme, the folder structure would look as so:

$OEM$$$RESOURCESTHEMEScoco.theme

If you dont have a .theme file but you have a .msstyles file you need to make one.  Simple copy the Luna.theme file and edit it in notepad.  In the middle itll list theme simply change it to your theme.

For example:

[VisualStyles]
Path=%ResourceDir%ThemesCOCOcoco.msstyles
ColorStyle=NormalColor
Size=NormalSize

By using a .theme file, you can specify not only the theme, but the wallpaper and screen saver to use.

Now in the unattend file you need to tell XP setup you\'re gonna use this.  I think this setting only applies to SP1, so you\'re gonna need to install from a slipstreamed cd.

In your unattend file add this:

[Shell]
CustomDefaultThemeFile=\"%Systemroot%ResourcesThemescoco.THEME\"

That\'s it.  Here\'s what happens.  When you install xp will report the hexed uxtheme.dll in setuperr.log but the install will go through since you used the DriverSigningPolicy=Ignore.  Next xp setup will see you specified a .theme and will install the .msstyles, wallpaper, and screen saver.

Here\'s a couple other ways you could do this;

There\'s a policy for the default theme, and to force a theme.

The policy is SETVISUALSTYLE and is documented in http://www.winguides.com/registry/display.php/1076/

I also found out the command you can run to specify a theme.

The command is:

%SystemRoot%system32rundll32.exe %SystemRoot%system32shell32.dll,Control_RunDLL %SystemRoot%system32desk.cpl desk,@Themes /Action:OpenTheme /file:\"C:WINDOWSResourcesThemescoco.theme\"

Another command that opens the appearance tab is:

%SystemRoot%system32rundll32.exe %SystemRoot%system32shell32.dll,Control_RunDLL %SystemRoot%system32desk.cpl desk,@Appearance /Action:OpenMSTheme /file:\"\"C:WINDOWSResourcesThemescoco.theme\"

Although the later i can\'t seem to get to work, the first command works but you need to click \'ok\'.  It would be very easy to make a script that runs the first command then clicks ok.

Enjoy,

Gosh