OK, so I've searched the Wiki & the forums, Googled other forums, waded through MSDN documents, tried multiple methods using makecab and WinCE Cab Manager, and I'm still unable to create a working CAB file that successfully applies customizations via the registry.
What I have are various XML files with the customizations I'd like to implement by creating one CAB I can call after hard resetting. The device of interest is an HTC Hermes running LWSV WM6, latest rom. Basically, at this point I need a "make CAB file from XML files" tutorial. I found the one in the Wiki here but the part I needed on the 2nd page hasn't been written.
Any kind soul willing to give me a hand?
TIA,
denali
Well, it would be easier to help you if you told us what is the specific problem you are running in to.
- Does makecab.exe fail to create a cab with your xml?
- Does the cab fail to install?
- Do you get some sort of error message at some point?
I made only one attempt at creating a registry only cab, but it was successful. All I did was:
makecab _setup.xml mysettings.cab
Here is one hint though: open your XML in IE or another browser. You will immediately see if it is malformed in some way (maybe a missing tag).
Thanks for your reply.
Makecab looked to be the simplest way, and it did generate a cab, which failed to install with not so much as an error message; it just informed me installation was unsuccessful. BTW, the cab was on my storage card.
One of my thoughts was that the code might be wrong, so I looked at the xml in IE, notepad, and even ran everything through the basic syntax scan Cab Manager does when trying to add text to the provisional xml areas. I did have to make some changes; maybe I'll have another go at scrubbing the files.
denali
There is another possibility for this error:
Your cab may not have permission to alter the security settings you are attempting to apply.
Some settings require a cab to be signed with a trusted certificate.
Ordinarily I'd tell you to application unlock your phone, but since you want to run the cab immediately after hard reset I am not sure how to solve the issue.
OK, so this is what I tried, following a one-bite-at-a-time strategy.
I extracted XML code and cleaned it up in Notepad, previewed it in IE with no glaring issues to my eye.
Code:
<wap-provisioningdoc>
<!-- 2-1. Home Screen Plug-in
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\Today\Items">
<characteristic type="Get Xpress Mail">
<parm name="Order" value="5" datatype="integer" />
</characteristic>
</characteristic>
</characteristic> -->
<!-- 3-2. Ringtone-->
<characteristic type="FileOperation">
<characteristic type="\Windows\Rings\gm sunny audio2.wav" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\gm sunny audio2.wav" translation="install"/>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Sounds">
<characteristic type="RingTone0">
<parm name="Sound" value="\Windows\Rings\gm sunny audio2.wav" datatype="string"/>
<parm name="Category" value="Ring" datatype="string"/>
</characteristic>
</characteristic>
</characteristic>
<!--4-1. PIE home page
<characteristic type="FileOperation">
<characteristic type="\Windows\default.htm" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\_default.htm" translation="install"/>
</characteristic>
</characteristic>
</characteristic> -->
<!--Delete Favorite-->
<characteristic type="Registry">
<nocharacteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\MSN Mobile" />
<nocharacteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\Pocket PC Web Guide" />
</characteristic>
<!--Add Favorite-->
<characteristic type="Registry">
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\MEdia Net" translation="filesystem" >
<parm name="Order" datatype="integer" value="0" />
<parm name="ReadOnly" datatype="integer" value="1" />
<parm name="URL" datatype="string" value="http://home/" />
<parm name="Icon" datatype="string" value="\windows\MEdia_Net_Home_01.bmp" translation="filesystem" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\PocketPC" >
<parm name="URL" datatype="string" value="http://pocketpc.com"/>
<parm name="Order" datatype="integer" value="1" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\AT&T Support - Pocket PC">
<parm name="URL" datatype="string" value="http://www.cingular.com/customer_service"/>
<parm name="Order" datatype="integer" value="2" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\My Windows Mobile">
<parm name="URL" datatype="string" value="http://www.mywindowsmobile.com/"/>
<parm name="Order" datatype="integer" value="3" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\WindowsMedia.com">
<parm name="URL" datatype="string" value="http://windowsmedia.com"/>
<parm name="Order" datatype="integer" value="4"/>
</characteristic>
<!-- 4-3. Settings View & Zoom -->
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main" translation="filesystem">
<parm name="ZoomSetting" datatype="integer" value="4" /> <!--zoom:medium-->
<parm name="MakeFit" datatype="integer" value="1" /> <!--view:default-->
</characteristic>
</characteristic>
<characteristic type="Registry">
<!-- 5-2. Show PIN2 Page -->
<characteristic type="HKLM\SOFTWARE\OEM\PhoneSetting" translation="filesystem">
<parm name="ShowPIN2Page" datatype="integer" value="1" />
<!-- Enable NITZ -->
<parm name="ShowNITZPage" datatype="integer" value="1" />
</characteristic>
<characteristic type="HKLM\Drivers\BuiltIn\RIL" translation="filesystem">
<parm name="NITZEnable" datatype="integer" value="1" />
<!-- Set SMS Service -->
<parm name="SMSService" datatype="integer" value="1" />
</characteristic>
<!-- SMS Settings -->
<characteristic type="HKLM\System\Inbox\Settings" translation="filesystem">
<parm name="SMStoSMTPShortCode" datatype="integer" value="121" />
<parm name="AllowSMStoSMTPConcatenation" datatype="integer" value="1" />
<parm name="AllowSMStoSMTPAddress" datatype="integer" value="1" />
<parm name="CurServiceName" datatype="string" value="SMS" />
</characteristic>
<!--Operator name string and service provider name showing rule-->
<characteristic type="HKLM\SOFTWARE\OEM\PhoneSetting" translation="filesystem">
<parm name="ONSDisplayRule" datatype="integer" value="4" />
<parm name="EnableUsimEF" datatype="integer" value="1" />
<parm name="Enable3GLongNamePrefix" datatype="integer" value="0" />
</characteristic>
<!--Override the GSM Short String Rule-->
<characteristic type="HKLM\ControlPanel\Phone" translation="filesystem">
<parm name="ShortStringExclusionList" datatype="multiplestring" value="*0","*1","*2","*3","*4","*5","*6","*7","*8","*9","#0","#1","#2","#3","#4","#5","#6","#7","#8", "#9""/>
</characteristic>
<characteristic type="HKLM\Software\Microsoft\Diagnostics" translation="filesystem">
<parm name="ShowLogCode" datatype="integer" value="65535" />
<parm name="DiagCode" datatype="integer" value="65534" />
</characteristic>
<!-- WiFi QoS Settings -->
<characteristic type="HKLM\Comm\TNETWLN1\Parms" translation="filesystem">
<parm name="WME_Enable" datatype="integer" value="0" />
</characteristic>
<!-- 0: Disable QoS feature -->
<!-- 1: Enable QoS feature -->
<!-- Disable IPv6
<characteristic type="HKLM\Comm\AFD" translation="filesystem">
<parm name="Stacks" datatype="multiplestring" value="tcpstkirdastkbtd" />
</characteristic>
<nocharacteristic type="HKLM\Comm\Devices\TCPIP6" translation="filesystem"/>
-->
<!-- 1.3.03 4. Remove "Disable IPv6" settings in Generic UI, Line 199. -->
<!-- Set GSM/UMTS band. -->
<characteristic type="HKLM\SOFTWARE\OEM\UMTS\BandSelection" translation="filesystem">
<parm name="Band" datatype="integer" value="0" />
<!-- (0:AUTO, 1:Euro band, 2:US band, 3:Japan band) -->
</characteristic>
<!-- 1.3.06 1. Set both "Network type" & "GSM/UMTS band" to "AUTO". -->
<!-- Remove "Band" page of phone "Options". -->
<characteristic type="HKLM\SOFTWARE\OEM\PhoneSetting" translation="filesystem">
<parm name="ShowUMTSBandPage" datatype="integer" value="1" />
<!-- (1: show GSM/UMTS band page) -->
<!-- (0, none : hidden GSM/UMTS band page) -->
</characteristic>
<!-- 1.3.06 2. Remove "Band" page of phone "Options". -->
<!-- 1.3.03 3. Add the correct "USB to PC" related settings in Generic UI, Line 201. -->
<!-- Set USB to PC Unchecked -->
<characteristic type="HKLM\Drivers\USB\FunctionDrivers" translation="filesystem" >
<parm name="DefaultClientDriver" datatype="string" value="Serial_Class" translation="filesystem" />
</characteristic>
<!-- Wireless Modem default APN setting -->
<characteristic type="HKLM\SOFTWARE\OEM\WModem" translation="filesystem" >
<parm name="Preset GPRS APN" datatype="string" value="isp.cingular" translation="filesystem" />
</characteristic>
<!-- 1.3.03 5. Update the Wireless Modem default APN to "isp.cingular" -->
</characteristic>
</wap-provisioningdoc>
Then I renamed it to "_setup.xml" and excuted makecab _setup. xml PP_Generic_UI_Hermes_CWS.cab; a CAB was generated w/o an error message. I copied the CAB to my Storage Card via USB/Activesync 4.5; it failed to install w/ the "Installation ... was unsuccessful" message.
Then I found a signing util in this link (http://forum.xda-developers.com/showthread.php?t=250216&highlight=sign), ran it w/ only an error message saying it was signed but not time stamped. I tried install this "signed" CAB via the method above, with the same results.
Any thoughts? Anybody?
denali
Question: After you signed the cab did you still get a question "This cab is not signed by a trusted certificate ..... install YES / NO?"
From what I saw in that thread, you need to provision your device with the certificate first, because you are not signing with one that is built in.
Also, on first glance, I can't see anything problematic with the XML so I guess you have to do this the hard way: comment all but one of the settings and create a cab. If it installs ok, uncomment another setting and try again until you find out what causes the installation to fail.
As to your question, I've never gotten a message like that. I installed the test certificate and attempted to install the CAB again with the same results. FWIW, after I click on the CAB, it looks like it's inatalling, complete with the progress bar except that when the final message comes up, mine reads Installation of <foo> was unsuccesful", and not in its own error box either.
I'm not convinced it's a signing issue, rather it seems to be something internal to the CABs, like I'm missing a step or file. I will step through the code as you suggested.
Thanks again,
denali
Right methods, wrong tool(s)
I found my problem.
I was unaware WinXP came with makecab.exe, so I dowloaded the Cabinet SDK, which seems to have been developed for Win98 or so, and used that executable. Bottom line, I was using an old executable.
I've successfully made single-line changes to my registry via CAB & CPF files, and, with a little luck, will get the rest of these customizations knocked out.
Thanks for your help levenum!
denali
Your welcome.
Actually, you just taught me something too. I knew desktop windows used cab files for installation, but I did not know cabwiz / makecab for them were readily available.
I always used the utilities from Pocket PC and Smartphone SDKs for WM 5 or 2003 depending on the device I was creating the cab for.
I'm trying to cook my own rom with XML files being executed on the preconfig.txt file but i'm having some issues
a) copying a file from the Windows folder into the ringtone folder and making it the default ringtone.
b) change the regional settings to UK English,
this is my xml for these two bits
Code:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<!--Ringtone-->
<characteristic type="FileOperation">
<characteristic type="\Windows\Rings\bennyhill.wma" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\benny.wma" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Sounds">
<characteristic type="RingTone0">
<parm name="Sound" value="\Windows\Rings\bennyhill.wma" datatype="string" />
<parm name="Category" value="Ring" datatype="string" />
</characteristic>
</characteristic>
</characteristic>
<!--Region-->
<characteristic type="Locale">
<parm name="Locale" value="2057" />
</characteristic>
</wap-provisioningdoc>
c) remove the files which i'm having to install as cabs instead of OEM's ( for some reason the OEM doesnt work properly)
this is my delete files bit
Code:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<!--deletefiles-->
<characteristic type="FileOperation">
<characteristic type="Windows\picsel.cab" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="Windows\PCMKeyboard09b.cab" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
i must be doing something very wrong if none of these xml things work
im not too hot on this myself but shouldnt the second part be full path?
eg
\Windows\picsel.cab
Imp
i'll try that but the copy file bit doesnt work and that is using the \Windows\*** syntax
working sample body
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
</characteristic>
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
<characteristic type="PowerPoint Mobile.lnk" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\ppt.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
dan1967 said:
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
</characteristic>
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
<characteristic type="PowerPoint Mobile.lnk" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\ppt.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
Click to expand...
Click to collapse
ok, but it doesnt really help that much.
so does making a directory above make the following lines assume that its "copying" the file TO that folder as it doesnt seem to be specified anywhere.. as i'm not creating a folder i thought my syntax was correct.
your assuption should be correct I think. In all the XML's I saw that handled files Makedir existed in that form no matter what. I am no specialist but I saw and used a lot of XML's.
best of luck,
dan
there anyway of running the XML file on a device without going through the pain of recooking/flashing?
ie copying the xml to the phone and exectuting it somehow?
Look for AdvancedConfig or HTCustom and they load & execute XML files
sorry for my stupid question ..
somebody tell me ..how can i install cab files to my artemis ?
soory again :confused
uluca09 said:
sorry for my stupid question ..
somebody tell me ..how can i install cab files to my artemis ?
soory again :confused
Click to expand...
Click to collapse
Copy them on the Artemis.
From the Artemis, locate them using the File Explorer.
Tap on them.
Copy the CAB file from the PC to the Artemis storage card or Memory (Just make a note of where you put it).
Start the phone and use File Explorer on the phone to locate the CAB file, tap it.
If it asks for permission to install files etc. answer YES.
Once complete press and hold the power button until the phone warns about powering down answer Yes, switch the phone back on Job Done.
As a tip, before you copy the CAB file to the phone use Windows Explorer on the PC, right click the CAB file select "Properties" and make the file read only this way the CAB file will remain intact once it is run (otherwise they self erase after use), store all your CAB files in a single folder on the Memory card, this way following a hard reset you can recover the phone - Mike
i cant ..
i was copy cab files to artemis stroge card when i tap install. started internet explorer and came some letter s like this
-
<wap-provisioningdoc>
- <characteristic type="Install">
<parm name="InstallPhase" value="install" />
<parm name="AppName" value="MoDaCo NoData" />
<parm name="InstallDir" value="%CE1%\MoDaCo\NoData" translation="install" />
<parm name="NumDirs" value="2" />
<parm name="NumFiles" value="1" />
<parm name="NumRegKeys" value="0" />
<parm name="NumRegVals" value="0" />
<parm name="NumShortcuts" value="1" />
</characteristic>
- <characteristic type="FileOperation">
- <characteristic type="%InstallDir%" translation="install">
<characteristic type="MakeDir" />
- <characteristic type="NoData.exe" translation="install">
- <characteristic type="Extract">
<parm name="Source" value="0CAB15F0.001" />
<parm name="WarnIfSkip" />
</characteristic>
</characteristic>
</characteristic>
- <characteristic type="%CE11%" translation="install">
<characteristic type="MakeDir" />
- <characteristic type="NoData.lnk" translation="install">
- <characteristic type="Shortcut">
<parm name="Source" value="%InstallDir%\NoData.exe" translation="install" />
</characteristic>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry" />
</wap-provisioningdoc>
not start install
sorry i know i make big mistake anywhre
Try downloading the CAB file again before putting it on the device it could be corrupt, which CAB file is it you are trying to put on the device - Mike
thanks now ok
thanks for helping one oldman ..now ok ..
my pc corrupt files ..
best regards
I want to specify my own connection settings in the ext rom by replacing or editing a particular file. I just extracted _setup.xml from pp_tmhr_connection_settings.cab that was in the Ext Rom, and have no idea how to read it. I know it specifies all (or most) of the connectino settings for my device, and I can figure out the xml tags and what not, but don't know how to edit or decifer the actual data specified.... as shown below. Someone please help me.
<wap-provisioningdoc>
<nocharacteristic type="CM_ProxyEntries"/>
<!-- Default Connection for Internet -->
−
<characteristic type="CM_ProxyEntries">
−
<characteristic type="HTTP-{0811B893-9F40-4130-80EF-B0C9E0A6FEFA}"> ---->I don't understand this string of characters<----
<parm name="SrcId" value="{0811B893-9F40-4130-80EF-B0C9E0A6FEFA}"/>
<parm name="DestId" value="{436EF144-B4FB-4863-A041-8F905A62C572}"/>
<parm name="Proxy" value="new-inet:1159"/> ---->I don't understand this either<----
<parm name="Type" value="0"/>
<parm name="Enable" value="1"/>
</characteristic>
Click to expand...
Click to collapse
Hi,
I have created the following xml provisioning file:
<?xml version="1.0" encoding="utf-8" ?>
<wap-provisioningdoc>
<characteristic type="BrowserFavorite">
<characteristic type="Sickipedia">
<parm name="URL" value="!!link deleted" />
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKLM\Software\Google\GoogleMaps">
<parm name="TestValue" value="test" datatype="string" />
</characteristic>
</characteristic>
<characteristic type="UnInstall">
<characteristic type="\Program Files\GoogleMaps\GoogleMaps.exe">
<parm name="uninstall" value="1"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
(excust the formatting)
I have run makecab and it created the cpf.
I have run cabsigntool and it signs it.
I try to run it on the device and it runs silently.
But....
It has NO EFFECT.
Is therer a permissions problem to set in the registry?
Or is the XML wrong?
any help appreciated...
Typical, I post it up then I solve it.
I used makecab to make a cab not a cpf and it worked.