Jump to content

5in1: Wallpaper, Custom Theme + 3 Tweaks, All From Runonceex


Recommended Posts

As the title says it all, this is a method to:

- Load your
Custom Theme
together with

- tweaks related to the theme,

- all from a small
single batch

- run from anypoint in the Install. Prefered and only well tested point being
RunOnceEx
.

* Theme (and wallpaper) choice:

- this provide an alternative to the well known winnt.sif->[shell] method.

- So far, I only found 2 old posts by Gosh (
&
, link) related to this way of doing but more than 2 years old. Nothing new under the sun!

- I did not find necessary one of the reg key he uses.
But my own theme is a very small thing, so it may be used in other situations.

Corresponding key is commented out in the batch.

- IMHO, this method is more flexible than the deeply integrated [shell] one.

It even can be used when creating new users, outside any unattended windows installation.

-The new user can have its very
own theme
set automatically.

-No need to share yours with your litle sister (or colleague) anymore!

* Tweaks:

- There again, I did not invent much. It's just annoying things that are still arround because their solutions is not standard and/or have pop-up recently:

1- The ungraceful
white background
behind
menu items
after applying a custom theme.

BoardBabe recently
a solution about it.
The cure can only be applied
after
the
Theme manager
has finished (after first RunOnceEx)

2- SmallIcons reg key (windows Explorer toolbars): doesn't work when applied to HKCU before desktop is loaded (T12, RunOnceEx, etc.).

Thanks to minalgar, the workaround was to use HKLM, meaning One-Size-Fits-All.

This tweak is applied
later
to HKCU, allowing
every user
to load its
own setting
automatically, just like for the theme.

3- Custom Theme is applied through an HKLM key before the Theme manager builds the actual theme keys from it.

HKLM means -again- all-users-the-same.

The 3rd tweak
cleans
that mess by removing the HKLM key
afterward
.

- These 3 tweaks work by importing the reg keys AFTER the Theme Manager and desktop (?) are loaded.

- A
2nd cmd file
is written on-the-fly in the
startup
program
group
.
- Progs in that group will be processed after RunOnceEx.

- In fact, they will be processed even
after Theme Manager
. bingo !

- The 2nd batch file imports the keys and then deletes itself.

-
Et Voilà!

-<edit cause=found>Credit for that startup thing goes goes to AndeK & blinkdt.-And of course, thanks to Zilexa puting me on the right track, this whole thing is language independant.

* RunOnceEx is the prefered time,

-especially if you set also your wallpaper this way:

- its key is in
HKCU
so if it is applied
before
your
first logon
:
--> it will go to the
HKU/.DEFAULT
hive (No User Hive),

--> then to the
Default User
Hive

--> and eventually to
your profile
.

-The first one is just plain registry pollution, the second imposes your setting to other users while
only
the last one is necessary if you care about that.

-The good time slot is thus quite short:

- after user
first login
,

- but before
Theme Manager
loads.

-I'm affraid that this leaves only one possibility...

- <POV>If, like me you love that green hill, with the mountains in the far, and those litle clo<Shut up!>, then you can call this batch from any point during install.

But IMHO, puting it in RunOnceEx is more 'pro' since that makes a sharper discrimination between OS setup (in the first place), and customization (later). Now, that's just a POV.

</POV>

* USAGE:

- The 5 actions performed by the batch are all optional.

The batch itself is optional (but why are you still reading then?).

--> Edit the 5 simple settings in it config section.

- Attached is a zip containing:

- the batch file together with

- a folder to store you theme stuff (mine is provided as an example).

-Its content will be copied to %SystemRoot%\Resources\Themes).

-If you load a theme, keep it side by side with the batch and put them with your other apps to install.

-Otherwise you don't need the folder.

-Wallpaper, if used, goes parallel to the batch (not in the folder).

Ijou desu

suggestion, criticism and feedback wecome.

ThemeRunOnceEx.zip

Edited by Djé
Link to comment
Share on other sites


Answers:

1 You don't need to reboot. It works straight on.

Reboot may only be required by other install. In that case only, try to give this thing enough time before reboot. Anyway, if it has not finished, it won't be deleted and start over at the next reboot and do the job.

It is very stubborn indeed! I am just discovering that as I am writing :w00t:

I wrote a warning inside the file about giving it enough time, but in fact it is not even required !

This is true for the startup part.

The RunOnceEx part has to complete. But there is no obvious reason why it should not.

2 svcpack ... addon ... this is all black magic to me. I'm trying to get rid of them ! No more deep integration ! :rolleyes:

Seriously, I don't know exactly when svcpack in processed, but if it is after start menu is built and HKLM is accessible, theme & tweaks should work fine. Wallpaper also if HKCU maps to HKU/.DEFAULT but that is dirty!

Link to comment
Share on other sites

Great work :thumbup

I don't know exactly when svcpack in processed, but if it is after start menu is built and HKLM is accessible, theme & tweaks should work fine. Wallpaper also if HKCU maps to HKU/.DEFAULT but that is dirty!

start menu is built right after svcpack :lol:

i think cmdlines.txt is executed after...

EDIT: :lol: just seen "call it from T-12" in your batch...

There's a feature left :

IF %SmallIcons%.==yes. GOTO Tweaks

it should be "1" instead of "yes", shouldn't it ?

Edited by Delprat
Link to comment
Share on other sites

There's a feature left :

IF %SmallIcons%.==yes. GOTO Tweaks

it should be "1" instead of "yes", shouldn't it ?

See, that's the problem with enthusiasm, it makes you stay awake far too long and make some last minute cosmetic changes which bugs what was running smooth before. Hopefully this one is not that much of an issue.

I really though I had double checked specifically all the instances of this 'yes', but indeed, it should be a 1 now.

Thanks Delprat, and I also updated the CHCP thing to take care of the non-850 cmd code pages (shouldn't be an issue in most cases), as you adviced. I will investigate further for the 1252 one (shouldn't be an issue either).

Download updated in the first post.

Link to comment
Share on other sites

This is interesting!

Last year I created 2 new things for in the Control Panel (in the appropiate catagory, don't know the English name):

- Logindialogs & Visual Extra's

- XPize modify icons on Desktop

The first allows you to change theme, wich will not only change theme but also the Loginscreen + shutdown/logoff Dialogs (it will change them to a style that fits the theme, only have a black style and a XPize blue style for the Dialogs).

I created this using WIHU (gives you the option to choose)

The second just starts XPize Settings.

They are meant to be used by every pc user.. it is not for runonceex... and it is very basic... requires the dialog/loginscreenfiles to be in a 7z archive on the pc... but whoever is intested, I will put it on a site or something some day.

Edited by ZileXa
Link to comment
Share on other sites

>>%UPM_CMD% ECHO ::Bye cruel world
>>%UPM_CMD% ECHO DEL /Q /F %%0
>>%UPM_CMD% ECHO EXIT
: --------------------- Tweaks end. --------------------

EXIT

1. too many exits (anyway they are not executed) :whistle:

2. imho DEL /Q /F %%0 need to change to DEL /Q /F %0 (maybe my command prompt is different but with 2 '%' the script is staying on the disk, but if delete one '%', the script is really leaving the cruel world)

Link to comment
Share on other sites

Hi Laura and thanks for the comments.

I think you may have misunderstood how the the script works so here are further explanations about them:

Theme.cmd works by writing a MagicUPMask.cmd file to your startup folder (the path to this file is stored in the %UPM_CMD% variable).

1a. There is only ONE exit:

Every thing on a line after '
>>%UPM_CMD% ECHO
' is actually only TEXT to be written to the
%UPM_CMD%
file, not commands executed inside THIS script.

So the first one in your quote is not an exit for this script, but only some text.

1b. Why the last one wouldn't be executed anyway?

2. When the text DEL /Q /F %%0 is written to the %UPM_CMD% file (using the command '>>%UPM_CMD% ECHO '), %%0 is transformed to %0.

So the
%UPM_CMD%
script can indeed delete itself after doing its job.

Theme.cmd actually doesn't need to delete itself (or do you need all your installers to delete themselves?)

The %doubling here has the same reason as all the %doublings, like in a for loop: prevent its expansion as a normal variable.

Now, if this Theme.cmd doesn't work for you, there may still be a problem with the code page thing (if my memory is right, you use a non 'western european' OS).

I have a workaround (not implemented in Theme.cmd yet) so let me know if it is the case.

In order to test if
Theme.cmd
is actually working or not, without making any change to your system:

- empty the theme & wallpaper file names in its
config
section, and set the repairs to 1.

- Then run it.

- If you now have a '
MagicUPMask.cmd
' file in your
Startup
folder (Start Menu/Programs/Startup),
Theme.cmd
DOES work.

- Just delete this
MagicUPMask.cmd
(actually this is the '%UPM_CMD%' file) if you don't want it to do the repairs at the next startup.

- But before, look at it: you should see the
DEL /Q /F %0
and
EXIT
lines at the end.

Indeed, I'd like to know if your command prompt is different than mine: does yours can cope with unicode?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...