Author Topic: TrID update + variants of theme-windows*.trid.xml for Windows Desktop Theme  (Read 5451 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 375
Hello,

some Windows Desktop Themes like g8-mod.theme are not recognised by
theme-windows-rem.trid.xml as "Windows Desktop Theme (with
remarks)". Instead they are described as "Unknown!" ( see appended
remark/output/trid-old.txt ).

So update this definition file by running tridscan and then manually tune
this XML file. Instead generic Microsoft web site use page about theme file
format by reference URL:
   <RefURL>
https://msdn.microsoft.com/en-us/library/windows/desktop/bb773190(v=vs.85).aspx
   </RefURL>

On systems i found no mime type registration for such files. Because the
themes are just simple text files mime type is now expressed by line:
   <Mime>text/plain</Mime>

Instead gathering random examples to update XML file, i remove of my own
j-them.theme optional parts according to reference documentation. Then test
it by control personalisation panel if modified theme is accepted and
successive update trid definition file.

So in j2them.theme remove optional lines concerning custom icons like for
Recycle Bin:
   [CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon]
   Full=%SystemRoot%\System32\imageres.dll,-54
By this modification in global string section now following lines vanish:
   <String>CLSID</String>
   <String>{20D04FE0-3AEA-1069-A2D8-08002B30309D}</String>
   <String>{208D2C60-3AEA-1069-A2D7-08002B30309D}</String>
   <String>{645FF040-5081-101B-9F08-00AA002F954E}</String>
   <String>DEFAULTICON</String>
   <String>RECYCLE</String>
   <String>EMPTY</String>
   <String>FULL</String>

When generating theme with graphical control panel them files start with a
remark. This comment line often looks like:
   ; Copyright ? Microsoft Corp.
But comment lines are not needed for functionality. So such lines can be
removed or changed like in j3norem.theme. By this modification in global
string section now following line for "copyright" vanish:
   <String>IGHT</String>

According to document boot section with screen saver line is optional. So
create variant j4no-scr.theme without lines:
   [boot]
   SCRNSAVE.EXE=%SystemRoot%\system32\ssText3d.scr

Then of course also ScreenSaveActive line in Control Panel Desktop section
is not needed any more. By this modification in global string section now
following lines vanish:
   <String>SCREENSAVEACTIVE</String>
   <String>BOOT</String>

According to reference Control Panel Cursors section is optional. So create
variant j5no-cur.theme without lines like:
   [Control Panel\Cursors]
   Help=%SystemRoot%\cursors\aero_helpsel_xl.cur
   AppStarting=%SystemRoot%\cursors\aero_working_xl.ani
By this modification in global string section now following lines vanish:
   <String>CURSORS</String>
   <String>APPSTARTING</String>
   <String>CROSSHAIR</String>
   <String>SIZENESW</String>
   <String>SIZENWSE</String>
   <String>SIZENS</String>
   <String>SIZEALL</String>
   <String>UPARROW</String>
   <String>HELP</String>
   <String>IBEAM</String>
   <String>NWPEN</String>
   <String>FULL</String>
   <String>WAIT</String>

Next create variant j6no-metric.theme without optional cursor and metric
section by removing also lines like:
   [Control Panel\Desktop\WindowMetrics]
   [Control Panel\Cursors.A]
   DefaultValue=Windows-Voreinstellung (extragro?)
By this modification in global string section now following line vanish:
   <String>WINDOWS</String>

The Control Panel Desktop section is required. But some examples have only
an empty pattern assignment line. So modified variant j7no-muster.theme
is found as valid if line is missing like:
   Pattern=
By this modification in global string section now following line vanish:
   <String>PATTERN</String>

Then create variant j12nostandard-amount.theme without optional cursor
section and custom icons by removing lines like:
   [CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\DefaultIcon]
   DefaultValue=%SystemRoot%\System32\imageres.dll,-25
   [Control Panel\Cursors]
   DefaultValue=Windows-Voreinstellung (extragro?)
So in global string section following line disappears:
   <String>DEFAULTVALUE</String>

The AppEvents Sections are optional. So for j-them.theme lines like
following does not occur:
   [AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Current]
Then in global section of trid file lines must be removed:
   <String>ENTS</String>
   <String>EXPLORER</String>

The original trid definition file only mention "theme" as file name
extension. But i also found examples like "travel~1.the" and
"thegol~1.the". This is now expressed by line:
   <Ext>THEME/THE</Ext>

When searching for extension "the" i find items like "Microsoft Plus! Pack
Desktop Theme" or "Windows'95 Desktop Theme - Microsoft Plus". Obviously
because of limitation of DOS 8+3 filename on installation CDs of Windows 9M
themes are stored like "thegol~1.the", then copied to Windows 98 drive and
finally renamed to "Goldene ?ra (High Color).theme". So these file contents
are equal. So mention this fact in remark line:
   <Rem>
extension "the" is found on install medium or precopy state of Windows 9M
and later renamed to "theme" by setup
   </Rem>


Documentation mention "BrandImage" assignment or "Slideshow" section found
in themes of Windows 7 or later. Unfortunately these items are optional. Or
"ThemeId" line which is not described by Microsoft. But finally i was able to
create 2 branches as replacements which seems to be reliable.

The first is theme-windows*-old.trid.xml which works for themes on older
windows versions with mentioned lines:
   [MasterThemeSelector]
   MTSM=DABJDKT
which gives in trid definition file new XML lines like:
   <String>DABJDKT</String>
   <FileType>Windows 98-7 Desktop Theme (with remarks)</FileType>

The other is theme-windows*-new.trid.xml for newer examples like
g8-mod.theme with lines:
   [MasterThemeSelector]
   MTSM=RJSPBS
which gives new XML lines like
   <FileType>Windows 8-10 Desktop Theme (with remarks)</FileType>
   <Rem>Theme with MTSM=RJSPBS in [MasterThemeSelector] only suited for Windows 8-10</Rem>
   <String>RJSPBS</String>

This behaviour for newer themes is not documented by Microsoft but described
on another website. So i change reference URL here by XML line:
   <RefURL>
http://www.drewkeller.com/content/using-theme-both-windows-7-and-windows-8
   </RefURL>
Newer Windows version are not DOS based any more. So "the" extension should
not occur any more. This is now expressed by changed XML line:
   <Ext>THEME</Ext>
With updated and variant definitions all such inspected themes are now
detected and described more accurate (See appended
remark/output/trid-new.txt).


After cleanup and generating theme-windows-rem-new.trid.xml and
theme-windows-rem-old.trid.xml for themes that start with remark line
(semicolon as first character) expressed by XML construct:
   <Bytes>3B</Bytes>
   <ASCII> ;</ASCII>
   <Pos>0</Pos>
above considerations must be also true for themes that direct starts with
section (bracket as first character) expressed by XML construct:
   <Bytes>5B</Bytes>
   <ASCII> [</ASCII>
   <Pos>0</Pos>

So update theme-windows.trid.xml and construct 2 branches
theme-windows-new.trid.xml theme-windows-old.trid.xml. So example
Elune8.1.theme is not described too general as "Generic INI configuration"
(see appended ini/output/trid-old.txt) but first description is now "Windows
8-10 Desktop Theme" (see appended ini/output/trid-new.txt)

Furthermore Windows theme can start with an empty line that is expressed by
XML construct like:
   <Bytes>0D0A</Bytes>
   <ASCII> . .</ASCII>
   <Pos>0</Pos>
This case is not considered. So create in same manner
theme-windows-crlf.trid.xml and 2 replacing branches
theme-windows-crlf-old.trid.xml theme-windows-crlf.trid.xml

Afterwards example like Panoramas-PanoramasNZJoshRobinson.theme is not
described any more as "Unknown!" (see appended
emptyline/output/trid-old.txt). Instead it is described correctly as
"Windows 8-10 Desktop Theme (start with empty line)" (see appended
emptyline/output/trid-new.txt)

With updated and variant definitions all inspected themes are now detected
and described more accurate.

TrID definitions, some examples and output are stored in archive THEme.zip.
I hope that my XML files can be used in future version of triddefs.

With best wishes
J?rg Jenderek

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: TrID update + variants of theme-windows*.trid.xml for Windows Desktop Theme
« Reply #1 on: September 11, 2017, 02:19:41 PM »
Many thanks Joerg!