PDA

View Full Version : [TUT]Apply your registry tweaks with a simple CAB file!


Diplomate
18th July 2008, 03:51 PM
Hello everyone.

I may be alone in this, but I always try to keep my PPCs as "lean" as possible, i.e. I only install those Apps which I really cannot do without (TomTom, RegEdit, etc.). One of the things I have always wanted to avoid is to have to install a whole app just to apply a few registry tweaks (always the same ones) after each hard (or soft) reset.

So, in the end, I just came up with the following solution for my Diamond, which works flawlessly: build a simple CAB file which only applies the registry changes I want!

This is actually a very simple thing to do. First, you have to create a file called _Setup.xml, which in my case looks like this:

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Phone">
<parm name="ShowSim" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Drivers\TouchPanel">
<parm name="PressureThreshold" value="240" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Security\Internet Explorer\User Agent">
<parm name="CustomBase" value="HTC-P3700-orange/PPC; 480x640; OpVer 30.126.2.732" datatype="string" />
</characteristic>
<characteristic type="HKLM\Software\HTC\AdvancedNetwork">
<parm name="SupportHSUPA" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P10">
<parm name="enabled" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P6">
<parm name="enabled" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P8">
<parm name="enabled" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P9">
<parm name="enabled" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Manila">
<parm name="HomeLSKText" value="Comms" datatype="string" />
<parm name="HomeLSKPath" value="\Windows\CommManager.exe" datatype="string" />
<parm name="HomeRSKText" value="Camera" datatype="string" />
<parm name="HomeRSKPath" value="\Windows\Camera.exe" datatype="string" />
</characteristic>
<characteristic type="HKLM\Software\HTC\HTCAnimation">
<parm name="StartupGif" value="\Windows\animated_OUT.gif" datatype="string" />
<parm name="StartupWav" value="\Windows\BootUpHTC_OUT.wav" datatype="string" />
</characteristic>
<characteristic type="HKLM\Software\HTC\PHONE">
<parm name="FaceDownMuteRing" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\GDI\GLYPHCACHE">
<parm name="limit" value="16384" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\Total Commander">
<parm name="ClassName" value="CECMD" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\MSClog">
<parm name="ClassName" value="MSClog" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\MSContactsUI">
<parm name="ClassName" value="MSContactsUI" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\PROGRAM">
<parm name="ClassName" value="Explore" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\RSSMAIN">
<parm name="ClassName" value="NewsBreak_Main" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\RSSHEADLINE">
<parm name="ClassName" value="HeadLineWindow" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\Phone">
<parm name="ClassName" value="Dialog" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\Folderview">
<parm name="ClassName" value="WCE_HTC_UXC_FOLDER" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\FileExplorer">
<parm name="ClassName" value="FEXPLORE" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\CONTACTS">
<parm name="WheelCount" value="2" datatype="integer" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="ClassName" value="MSContactsUI" datatype="string" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SmartTouch\ContactChooser">
<parm name="ClassName" value="MSContactChooser" datatype="string" />
<parm name="Mode" value="4" datatype="integer" />
<parm name="WheelCount" value="2" datatype="integer" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

This includes all the registry changes I want to do to my Diamond after each hard reset.

Then, I use a DOS-based program called MakeCab.exe (Google it to find where to download it from on the Microsoft site - it is free) to generate a CAB file based on this XML file, with the following command:
C:\<whatever path>\makecab _Setup.xml RegistryTweaks.cab

And I end up with a nice little CAB I can run on my Diamond after each soft/hard boot to make sure all my settings get back to where I want them in less than 5 seconds!

There is one which I was not able to find in the registry: when you go into "Settings / System / Screen / Text Size" you are able to set the size normally used to display text in the interface. Does anyone know where this value is stored in the Registry? I would love to be able to add it to my list, and do away entirely with manual configuration...

Posted here to provide a starting point in case any of you want to adopt the idea... :)

Blob8me
18th July 2008, 04:00 PM
this has got to be one of the most informative posts I've ever read? :)

Here's a member who in one simple and clear post talks us through how to do something that probably drives many of us mad each time we load a new Rom.....

but not only does he talk us through how, and give us a cab file based on his own tweaks..... BUT he share the "how I did this part" too... Brilliant..

I've learnt something.... Thank you Diplomate for teaching me how rather than just showing me how you did it. That to me is cool.... :cool:


.

vijayvasa
18th July 2008, 04:21 PM
I agree with the above user too, this is really useful to know and I am happy that I learnt something today :)

mgear356
18th July 2008, 05:12 PM
great information!

found this nice interface cab maker too
http://www.brothersoft.com/cab-maker-71732.html


resolved..

Diplomate
18th July 2008, 05:29 PM
Try with the method I outlined. If the tool you used to make your CAB includes in it any of the normal installer entries which are necessary to place files on the device, create directories, etc. then you will get issues/failures. I did get some myself when I started doing this basing myself on CABs from installers which put files on the device - I then looked up how to make a cab which only writes to the registry, and this is the process I outlined.

Good luck!

P.S. Also, look at the syntax of your XML file!!! You are forgetting all your datatypes... :)

Diplomate
18th July 2008, 05:48 PM
Humm, don't know, but you could try optimizing it like this, perhaps?

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\FontLink\SystemLink" >
<parm name="Times New Roman" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
<parm name="Arial" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
<parm name="Courier New" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
<parm name="Tahoma" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

mgear356
18th July 2008, 05:51 PM
Humm, don't know, but you could try optimizing it like this, perhaps?

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\FontLink\SystemLink" >
<parm name="Times New Roman" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
<parm name="Arial" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
<parm name="Courier New" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
<parm name="Tahoma" value="\Windows\sunglobe.ttf,UniSun" datatype="string" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
thanks mate managed to fix it after yr advise..
Best tweak ever!

pulp
18th July 2008, 09:46 PM
Thank you, i always wondered about how to make a registry .cab but never had the time to reasearch it. this explians it in a simple and clear manner.

lude219
19th July 2008, 12:14 AM
fantastic post! I've always wondered why there isnt a registry tweak CAB and lo' and behold!:)

Use2Smoke
19th July 2008, 12:15 PM
heeey VerrY nice mano ThnX VeRRY much,.. Saves XXtreme time and bloodpressure

just wanted to say, that in the lines of enabling the camera tweak of P10, P8 and P9 you have wrote enabled instead of enable... don't know 4 sure if this
is Ur purpose, but in this way in Ur reg U've got enable and enabled in that regfolder...

Fabliv
19th July 2008, 12:26 PM
Hi Diplomate,

Really nice idea, thanks for your explanation !

:D

SurfHost
19th July 2008, 01:35 PM
Here is the one i use:


<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Sounds\RingTone0">
<parm name="Script" value="v1w1v1w1v1w1c50apw3c150r" datatype="string" />
</characteristic>
<characteristic type="HKLM\Security\Policies\Policies">
<parm name="0000101a" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Comm\ConnMgr\Planner\Settings">
<parm name="CacheTime" value="60" datatype="integer" />
<parm name="SuspendResume" value="GPRS_bye_if_device_off" datatype="multiplestring" />
</characteristic>
<characteristic type="HKCU\ControlPanel\BackLight">
<parm name="AutoDeviceLockEnable" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="DisableSMSWakeUpEvent" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\HTCAlbum">
<parm name="ok_minimize" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\EnlargeTitleBar">
<parm name="Enable" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\HTCAnimation">
<parm name="StartupGif" value="\Windows\none_.gif" datatype="string" />
<parm name="StartupWav" value="\Windows\none_.wav" datatype="string" />
</characteristic>
<characteristic type="HKLM\Software\HTC\AdvancedNetwork">
<parm name="SupportHSUPA" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\StorageManager\FATFS">
<parm name="EnableCache" value="1" datatype="integer" />
<parm name="CacheSize" value="16384" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\StorageManager\Filters\fsreplxfilt">
<parm name="ReplStoreCacheSize" value="131072" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\GDI\Glyphcache">
<parm name="limit" value="131072" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\OEM\Power">
<parm name="ShowMovingChargeBar" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\SUPL AGPS">
<parm name="EnableAGPS" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\Captparam">
<parm name="CapKeyDelayTime" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\Microsoft\Calendar">
<parm name="ShowTextInWeekView" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKCU\Software\HTC\TaskManager">
<parm name="EnableTabAndHold" value="0" datatype="integer" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

Diplomate
19th July 2008, 09:07 PM
Thank you very much, Use2Smoke, well spotted! I have tweaked several times with that file, but I did not realise I had posted it like that!

geraldkw
20th July 2008, 10:12 AM
Works really perfect. Thanks Diplomate!

Oppainter
20th July 2008, 03:37 PM
I've a little problem with my .cab file!

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="DisableSMSWakeUpEvent" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="EnableFastDormantDisplayDuringCall" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="BatteryTimeoutInCall" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="BatterySuspendTimeoutInCall" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Drivers\TouchPanel">
<parm name="PressureThreshold" value="240" datatype="integer" />
</characteristic>
<characteristic type="HKEY_LOCAL_MACHINE\Software\HTC\HTCAlbum">
<parm name="ok_minimize" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P10">
<parm name="enable" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P6">
<parm name="enable" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P8">
<parm name="enable" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\Camera\P9">
<parm name="enable" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\AdvancedNetwork">
<parm name="SupportHSUPA" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\State\Hardware">
<parm name="Headset" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKCU\ControlPanel\BackLight">
<parm name="AutoDeviceLockTimeout" value="30" datatype="integer" />
</characteristic>
<characteristic type="HKCU\ControlPanel\Backlight">
<parm name="dimBKLinUnlockScreen" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKCU\ControlPanel\Sounds\RingTone0">
<parm name="Script" value="apv0r" datatype="string" />
</characteristic>
<characteristic type="HKCU\ControlPanel\Notifications\Default">
<parm name="Duration" value="10" datatype="integer" />
</characteristic>
<characteristic type="HKCU\ControlPanel\Phone">
<parm name="Sleep" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\HTC\HTCAnimation">
<parm name="StartupGif" value="\Windows\animated_OUT.gif" datatype="string" />
<parm name="StartupWav" value="\Windows\BootUpHTC_OUT.wav" datatype="string" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
When i sync my td and i place this file on internal storage (4GB) and i wanna install he gives the messages that it was unsuccesfull. Anyone knows why??

Diplomate
20th July 2008, 06:54 PM
Try combining the entries for the same registry key all in one:

<characteristic type="Registry">
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="DisableSMSWakeUpEvent" value="0" datatype="integer" />
<parm name="EnableFastDormantDisplayDuringCall" value="0" datatype="integer" />
<parm name="BatteryTimeoutInCall" value="0" datatype="integer" />
<parm name="BatterySuspendTimeoutInCall" value="0" datatype="integer" />
</characteristic>

Apparently, it does not like finding the same registry key twice in the file... same problem mgear356 was having earlier on in the thread.

Oppainter
20th July 2008, 07:02 PM
Try combining the entries for the same registry key all in one:

<characteristic type="Registry">
<characteristic type="HKLM\Drivers\BuiltIn\RIL">
<parm name="DisableSMSWakeUpEvent" value="0" datatype="integer" />
<parm name="EnableFastDormantDisplayDuringCall" value="0" datatype="integer" />
<parm name="BatteryTimeoutInCall" value="0" datatype="integer" />
<parm name="BatterySuspendTimeoutInCall" value="0" datatype="integer" />
</characteristic>

Apparently, it does not like finding the same registry key twice in the file... same problem mgear356 was having earlier on in the thread.
Oké i try!!

akito
23rd July 2008, 05:23 PM
Is it possible to make it appear in the list of installed programs for easy an easy uninstall?

pizzachips
23rd July 2008, 08:18 PM
Is it possible to make it appear in the list of installed programs for easy an easy uninstall?

this is a direct reg edit, not installing a program....
you can get a direct uninstall by making another cab to set all your reg values that you changed back to default

Diplomate
24th July 2008, 02:58 PM
Exactly. The only way to revert this is with an "opposite" Cab file which sets all the registry values back to their default.

just_a_guy
12th August 2008, 01:54 PM
Sry not sure how to delete post...Pls ignore problem solved....thks...

MasK
12th August 2008, 02:22 PM
I use WinCE cab manager:
http://www.ocpsoftware.com/products.php?nm=cecabmgr

Not only I can insert registry values with a GUI, I can add files, shortcuts, etc.
So I have a cab that contains all my ringtones AND all my registry tweaks and settings. One install and all my sounds and notifications (including all alarms) are set with the right tones selected :)

just_a_guy
12th August 2008, 02:39 PM
thanks u :)

xavierdemon
12th August 2008, 02:53 PM
Awesome post, will give it a go :)

salada2k
12th August 2008, 04:04 PM
I use WinCE cab manager:
http://www.ocpsoftware.com/products.php?nm=cecabmgr

Not only I can insert registry values with a GUI, I can add files, shortcuts, etc.
So I have a cab that contains all my ringtones AND all my registry tweaks and settings. One install and all my sounds and notifications (including all alarms) are set with the right tones selected :)

Yes, it's nice software but unfortunately it is not free!

Diplomate, thank you for a very informative post. It's a great (free!) solution to a problem that we all have!! Kudos to you my friend.

Zakkosekk
12th August 2008, 10:21 PM
Hello everyone.

There is one which I was not able to find in the registry: when you go into "Settings / System / Screen / Text Size" you are able to set the size normally used to display text in the interface. Does anyone know where this value is stored in the Registry? I would love to be able to add it to my list, and do away entirely with manual configuration...

Posted here to provide a starting point in case any of you want to adopt the idea... :)

Well, you will be able to add it today :D
Change CurFont in HKLM\ControllPanel\Stylus\192DPI
Use values between 600 to 1100.

Not sure if you should change SystemFontPercent and Zoom in HKCU\Software\Microsoft\Inbox\Settings as well as they also differ when I compare the registry files.
However, it works when I only change the CurFont.

I used the compare function in CE RegEditor to find what changed, http://www.freewarepocketpc.net/ppc-download-ceregeditor-v0-0-3-0.html.
I created two registry files, one with small font and one with large font.
Then I compared the files:)

amir77a
12th August 2008, 11:47 PM
It seems that I have missed something.

How can I know which values should I put in my setup.xml file?

How can I export my current registry settings?

absorber786
4th September 2008, 11:05 AM
brilliant post firstly....
secondly, do you know if it possible to dump the reg settings from advanced config? this can hopefully facilitate my xml file :)

lobsterdave
7th April 2009, 11:33 PM
Is it possible to make it appear in the list of installed programs for easy an easy uninstall?

looks like adding something like this to the top of your _Setup.xml will add it to the list of programs you can uninstall

<characteristic type="Install">
<parm name="InstallPhase" value="install" />
<parm name="AppName" value="Lobsterdaves Udk WM6.5 Fixes" />
<parm name="NumRegKeys" value="4" />
<parm name="NumRegVals" value="4" />
</characteristic>

here's mine in full


<wap-provisioningdoc>
<characteristic type="Install">
<parm name="InstallPhase" value="install" />
<parm name="AppName" value="Lobsterdaves Udk WM6.5 Fixes" />
<parm name="NumRegKeys" value="4" />
<parm name="NumRegVals" value="4" />
</characteristic>
<characteristic type="Registry">
<characteristic type="HKCU\Software\Microsoft\Inbox\Settings\OEM">
<parm name="SMSInboxThreadingDisabled" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Security\Phone\Inbox\Skin">
<parm name="Enabled" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\\System\CurrentControlSet\Control\Power\Timeo uts">
<parm name="ACResumingSuspendTimeout" value="120" datatype="integer" />
<parm name="BattResumingSuspendTimeout" value="120" datatype="integer" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

ace10134
18th June 2009, 07:47 PM
I figured out my problem, I wasn't doing the command prompt properly. So ignore me!

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\.NETCompactFramework">
<parm name="3.5.7283.00" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKLM\Software\OEM\TFLOSettings">
<parm name="EnableScroll" value="0" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\GDI\GLYPHCACHE">
<parm name="limit" value="8192" datatype="integer" />
</characteristic>
<characteristic type="HKLM\System\StorageManager\FATFS">
<parm name="CacheSize" value="4092" datatype="integer" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

I have that code in an XML file, and I put that into a .cab, but I get install unsuccessful. :confused: I don't know what to do! I've checked this over like 20 times and I just cant get it to work.

m_s_ifland
4th December 2009, 08:32 PM
Great post thanks for the cool info. Let's say that I wanted to delete a registry entry using this method, how would I do that.
Thanks.

m_s_ifland
23rd December 2009, 11:11 PM
I have learned a lot thanks to your post. I have made a few cabs going by your tutorial. I have a question though, it seems when I try to alter a "dword" value, the cab won't install. With "string" and "integer" this works fine but with "dword" it don't. Is there something else I should know when modifying a "dword" value?
Thanks for your knowledge.

m_s_ifland
26th December 2009, 03:42 PM
Any ideas on the above post???