[Upgrading, Modifying and Unlocking] BenThon:
TSK Findings

1.	In ThemeGenCE Help file :

Files to be copied to PocketPC.

The possible extensions are « . bmp », « . gif », « . jpg » et « . png ».

The possible names are : (See page : Metabase Settings for FileOperation Configuration Service Provider)

first : (used to define the image of the menu « Start »)

o	stwater_131_131

o	stwater_96_96

o	stwater_192_192

o	stwater_480_640

o	stwater_480_480

o	stwater_640_480

o	stwater_320_240

o	stwater_240_320

o	stwater_240_240

o	stwater

in addition : (used to define the image of the menu « Today»)

o	tdywater_131_131

o	tdywater_96_96

o	tdywater_192_192

o	tdywater_480_640

o	tdywater_480_480

o	tdywater_640_480

o	tdywater_320_240

o	tdywater_240_320

o	tdywater_240_240

o	tdywater

stwater et tdywater are the generic names used by default (used by the program « Theme Generator » of Microsoft), the others being used for the Themes with specific sizes of images.

Files are renamed in the CAB with short names (8 letters) but in the file of information INF (extension ".000) it is kept a trace of the real names.

2.	ThemeGenCE :

In images form the program lets you choose the saving images format. The images will be saved in the TSK depending on your choice. But for easier maintenance in the program, ThemeGenCE changes the file extension to “.gif”. Nevertheless your image format is preserved. Windows Mobile does not care about the extension, it always recognized the image format independently of the extension (On Windows XP, gdiplus does the same).

3.	TSKs or CABs

In all documentations I have read, I found that the files in the CAB cannot be compressed (independently of image format where there is a compression like in JPG or GIF).

But I have found that if I do a TSK with a bitmap image (which is not compressed) and use Makecab to create the TSK, files in the TSK are compressed. But the TSK works on the mobile with WM5 (but does not work with WM 2003 first edition).

This works only if the setup is in XML. No, it works fine for TSK with ".000" inf file too !

Thanks to meschle who finds the error I made in this TSK I sent him. I was thinking it does not work. See TSK here beneath.

4.	TSK and _setup.xml with WM5

I noticed that if I build a TSK without an Inf file (compiled with extension “.000”) but with a _setup.xml instead, it also work with WM5.

The drawback of this is that binary data must be BASE 64 encoded in the xml, so it is not so intuitive to understand what is in the datas.

Future version of MSCEInf will be able to view the contents of such cabs. But, for now, ThemeGenCE does not manage these TSK themes.

_setup.xml listing :

<wap-provisioningdoc>

<characteristic type="Install">

<parm name="InstallPhase" value="install" />

<parm name="ProcessorType" value="2577" />

<parm name="OSVersionMin" value="3.0" />

<parm name="OSVersionMax" value="100.0" />

<parm name="AppName" value="HTC_Default BenThon" />

<parm name="InstallDir" value="%CE2%" translation="install" />

<parm name="NumDirs" value="2" />

<parm name="NumFiles" value="1" />

<parm name="NumRegKeys" value="3" />

<parm name="NumRegVals" value="11" />

<parm name="NumShortcuts" value="0" />

</characteristic>

<characteristic type="FileOperation">

<characteristic type="%CE2%" translation="install">

<characteristic type="MakeDir" />

<characteristic type="stwater.gif" translation="install">

<characteristic type="Extract">

<parm name="Source" value="0stwater.001" />

</characteristic>

</characteristic>

</characteristic>

<characteristic type="%InstallDir%" translation="install">

<characteristic type="MakeDir" />

</characteristic>

</characteristic>

<characteristic type="Registry">

<characteristic type="HKLM\Software\Microsoft\Color">

<parm name="5" value="gq9VAA==" datatype="binary" />

<parm name="9" value="////AA==" datatype="binary" />

<parm name="34" value="jMhQAA==" datatype="binary" />

</characteristic>

<characteristic type="HKCU\Software\Microsoft\Today">

<parm name="DPI" value="96" datatype="integer" />

<parm name="UseStartImage" value="1" datatype="integer" />

</characteristic>

<characteristic type="HKCU\Software\Microsoft\Today\HTC_DefaultUSIxml.tsk">

<parm name="Color_Highlight" value="jMhQAA==" datatype="binary" />

<parm name="Color_HighlightText" value="////AA==" datatype="binary" />

<parm name="Color_SoftkeyFlat" value="gq9VAA==" datatype="binary" />

<parm name="Color_TitleFlat" value="gq9VAA==" datatype="binary" />

<parm name="Color_CommandBarText" value="////AA==" datatype="binary" />

<parm name="Color_TitleFlatCenter" value="gq9VAA==" datatype="binary" />

</characteristic>

</characteristic>

</wap-provisioningdoc>

And with future version of MSCEInf you will see this :

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Color]

"5" = hex : \

82, AF, 55, 00

"9" = hex : \

FF, FF, FF, 00

"34" = hex : \

8C, C8, 50, 00

[HKEY_CURRENT_USER\Software\Microsoft\Today]

"DPI" = dword : 00000060

"UseStartImage" = dword : 00000001

[HKEY_CURRENT_USER\Software\Microsoft\Today\HTC_DefaultUSIxml.tsk]

"Color_Highlight" = hex : \

8C, C8, 50, 00

"Color_HighlightText" = hex : \

FF, FF, FF, 00

"Color_SoftkeyFlat" = hex : \

82, AF, 55, 00

"Color_TitleFlat" = hex : \

82, AF, 55, 00

"Color_CommandBarText" = hex : \

FF, FF, FF, 00

"Color_TitleFlatCenter" = hex : \

82, AF, 55, 00

See the TSK here.