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.
BBConnect_WM6_Professional_BB_4[1].0.0.84 from htc
not tested from me
link
so it is 4.1.0.86 or 4.0.0.86? the latest one we have so far is 4.0.0.90. thanks.
i think4.1.0.86
cab file is BBConnect_WM6_Professional_BB_4_1_.0.0.84.cab
However the _setup.xml shows:
<parm name="OSVersionMin" value="5.2" />
<parm name="OSVersionMax" value="5.99" />
<parm name="BuildNumberMin" value="0" />
<parm name="BuildNumberMax" value="-536870912" />
<parm name="UnsupportedPlatforms" value="HPC?PALM PC2?JUPITER?" />
and
<parm name="BBAppVersion" value="4.0.0.84" datatype="string" />
Not using BB any more so can't try it but would be interested if it is newer and works with wm6 for the future
It's the 4.0.0.84 version. the [1] states that there has been a sort of copy.
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
All I want to be able to do is move and copy shortcuts with XDA_UC XML files, that's all I want to do, but I can't make sense of any of the examples.
It's not what I'm used to... I can't tell if the source is defined before or after the destination, I can't figure out the environmental variable (eg %CE2%) and can't figure out commands needed to perform a simple task such as relocating a shortcut.
Could someone please spell this out for an xml noob like me?
Thanks
Smtih
Believe me, mortscript is your dear friend for stuff like this ... but you asked for provxml, so here is an example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2" translation="install">
<characteristic type="MakeDir" />
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2\iLock2.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE11%\S2U2\iLock2.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2\S2U2 Settings.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE11%\S2U2\S2U2 Settings.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2\S2U2.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE11%\S2U2\S2U2.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\S2U2" translation="install">
<characteristic type="RemoveDir" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
The example above is how to create a new directory/folder, move shortcuts from an existing folder into that new one, and then remove the original folder.
Best regards,
-boggsie
boggsie said:
Believe me, mortscript is your dear friend for stuff like this ... but you asked for provxml, so here is an example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2" translation="install">
<characteristic type="MakeDir" />
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2\iLock2.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE11%\S2U2\iLock2.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2\S2U2 Settings.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE11%\S2U2\S2U2 Settings.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\S2U2\S2U2.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE11%\S2U2\S2U2.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE11%\S2U2" translation="install">
<characteristic type="RemoveDir" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
The example above is how to create a new directory/folder, move shortcuts from an existing folder into that new one, and then remove the original folder.
Best regards,
-boggsie
Click to expand...
Click to collapse
Thank you very much! Just what I needed
I've been reading about mort, and I think you're right. How does XDA_UC impliment mort? \Storage Card\XDA_UC\Scripts ? or just \XDA_UC ?
Hi,
I would like to create a software in order to save Emails account in a provxml file, and reload this provxml file after a hard reset for example.
Here is my code
Code:
string[] StorageList;
StorageList = GetStorageCardNames();
XmlDocument configDoc = new XmlDocument();
configDoc.LoadXml("<wap-provisioningdoc><characteristic-query type=\"EMAIL2\" recursive=\"true\"/></wap-provisioningdoc>");
XmlDocument output = ConfigurationManager.ProcessConfiguration(configDoc, true);
output.Save("\\" + StorageList[0].ToString().Trim() + "\\email.provxml");
MessageBox.Show("Your email config is complete, on \\" + StorageList[0].ToString().Trim() + "\\email.provxml", "Done");
Code:
Here is my provxml result :
<wap-provisioningdoc>
<characteristic type="EMAIL2" recursive="true">
<characteristic type="{88947265-7B57-7D04-F748-B52E49C52B09}">
<parm name="SERVICENAME" value="free.fr" />
<parm name="SERVICETYPE" value="POP3" />
<parm name="INSERVER" value="free.fr" />
<parm name="AUTHNAME" value="toto" />
<parm name="OUTSERVER" value="smtp.free.fr" />
<parm name="REPLYADDR" value="[email protected]" />
<parm name="SMTPALTAUTHNAME" value="Toto" />
<parm name="NAME" value="transfairre" />
<parm name="LINGER" value="0" />
<parm name="RETRIEVE" value="2048" />
<parm name="KEEPMAX" value="0" />
<parm name="DWNDAY" value="3" />
<parm name="FORMAT" value="2" />
<parm name="AUTHREQUIRED" value="0" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
I don't retrieve the AUTHSECRET field, who is the password field.
I would like to know if there is a solution in order to get the password, in order to have automatically a complete provxml configuration file.
Great thanks
regards,
Nixeus
Hi Nixeus
Can this help you http://forum.xda-developers.com/showthread.php?t=685979 or this http://forum.xda-developers.com/showthread.php?t=295889 or http://forum.xda-developers.com/showthread.php?t=681337 ?
This is the one I used in the last year http://forum.xda-developers.com/showpost.php?p=4631640&postcount=5
Hello my friend and thanks for your answer.
I have read your links but in all tha case, we nee to add manually the password on the provxml file.
Is there a way to retrieve it manually ?
I really don't know, I just use the last link to create a cab for my 2 mailboxes and it works without inputting anything.