yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] DaveShaw:
CSPs Examples

Hi All,

I have found this handy MSDN article full of examples for FileOperations in your Provisioning XML: http://msdn.microsoft.com/en-us/library/bb737633.aspx

It came in useful for me when I was figuring out how to do delete a file.

Here is the extract of the XML for basic FileOperations:

<characteristic type="FileOperation">
<characteristic type="%CE14%" translation="install">
<characteristic type="MakeDir" />
<characteristic type="MineSweeper.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source"
value="%CE2%\winmine.exe" translation="install"/>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="%CE2%\files" translation="install">
<characteristic type="MakeDir" />
<characteristic type="file1.txt">
<characteristic type="Extract">
<parm name="Source" value="file1.001" />
</characteristic>
</characteristic>
<characteristic type="file2.txt">
<characteristic type="Copy">
<parm name="Source"
value="%CE2%\files\file1.txt" translation="install"/>
</characteristic>
</characteristic>
<characteristic type="file3.txt">
<characteristic type="Move">
<parm name="Source"
value="%CE2%\files\file2.txt" translation="install"/>
<parm name="RemoveAttributes" value="H" />
</characteristic>
</characteristic>
<characteristic type="%CE2%\files\file1.txt"
translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="%CE2%\files\file3.txt"
translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="%CE2%\files" translation="install">
<characteristic type="RemoveDir" />
</characteristic>
</characteristic>
</characteristic>

Also, here is an the MSDN Registry example: http://msdn.microsoft.com/en-us/library/bb737572.aspx (Although I think we have enough of those).

Thanks

Dave
[Windows Mobile Software Development] Radimus:
leave the card in the phone then hard reset (flash ROM)
[Windows Mobile Software Development] ryano2121:
Copy files

Ok - thanks a lot! I have it set up to load my cabs and it worked great.

Now I would like to copy my Greatbal SPB theme .dat files into the SPBMS2.1 program. From what I can tell, this is the basic outline for how to do it. If someone could help me write this one, I think I can figure out how to do the rest of what I would like to do on my own.

Also, where does this go? In the sdconfig.txt file?

<-- File Operations -->

<-- Copy the SP Timesync link to startup so it gets executed whenever I reset -->

<characteristic type="FileOperation">

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

<characteristic type="MakeDir" />

<characteristic type="StartTimeSync.lnk" translation="install">

<characteristic type="Copy">

<parm name="Source" value="\windows\Start Menu\Programs\SP TimeSync.lnk" translation="install" />

</characteristic>

</characteristic>

</characteristic>

</characteristic>

</wap-provisioningdoc>
[Windows Mobile Software Development] DaveShaw:
This would go in the ProvXML file. Re read the 2nd and 3rd posts. It does explain it all.

Also try xcopyce (my tool) there is a link in my sig for it.

Ta

Dave
[Windows Mobile Software Development] ryano2121:
Almost got it. Is this another .txt file? If so, what do I save it as and where do I save it to?
[Windows Mobile Software Development] DaveShaw:
If ur on about Prov Xml create a file called Prov.xml with the above xml in it and add XML: \Storage Card\Prov.xml to the sdconfig file. (Save the Prov.xml on the root of ur card).

ta

Dave
[Windows Mobile Software Development] ryano2121:
Yeah, I'm lost

Alright, I have read everything I could find on this and still can't figure it out.

I have the sdconfig.txt file installing all my cabs and it works fine.

I want to make some further customizations and I just can't figure out how.

Example:

Can I customize the ring tone - set it to WindowsMobile?

Can I replace the .dat files in my MS2.1 file on my ppc with the .dat files from the Greatbal theme I use?
[Windows Mobile Software Development] logger:
Does UC work on HTC Diamond Internal Storage

Will UC work on the Diamond which has 4GB Internal Storage instead of a SD card. (I thought I posted this Q earlier but cannot find it now.) If is does work I realise, 1) the rom would need to be compatible, and 2) SDConfig.txt would need to point to \Internal Memory\ instead of \Storage Card\
[Windows Mobile Software Development] Red49er:
Could you be a little more clear? I thought all cabs had to be installed from the Storage Card? If I understand you correctly, I need to install something from my device first, and then it should let me cpy1/2 from my storage card?
[Windows Mobile Software Development] gthing:
Hey can you update the main post to include WizeMan's new SNE rom as UC compliant?

http://xdaforums.com/showthread.php?t=364641
[Windows Mobile Software Development] _Alex_:
This is *AMAZING*. As is, it can completely replace Tier Autoinstall. If you could you add the ability to save registry keys and restore them like settings saviour, it'd be the ONLY thing I'd use!
[Windows Mobile Software Development] Sleuth255:
Got it, ROM added to list :)
[Windows Mobile Software Development] Sleuth255:
Building provisioning XML is the next thing as it can do what you ask. Right now it's hand coded and a bit laborious. Once it's working though, you can just forget about it. I was thinking along the lines of auto provisioning for common settings like power/backlight, notifications, sounds etc. For example, just check "Save backlight & Power settings" and the registry would be queried and registry CSP commands created in the xml file. In this manner, you could also specify a regkey to save and it would generate Registry CSPs for the entire key/values.
[Windows Mobile Software Development] gthing:
I want!

Who do I have to do to get my hands on that?

If it could make building the .xml file easier as well, than it would be an absolute godsend.
[Windows Mobile Software Development] illi:
Hi

Fantasic development there.

I am using HTC Tornado WM6 Home-brewed ROM.

The attached file is used by WM5 to auto-install software after a hard reset. It still works on my WM6. This file when copied to SD Card must be renamed 2577, placed on the root directory of the SD Card and inserted into the device prior to either a hard or soft reset. It will then autorun and installs accordingly.

I thought I wanted you guys to have a look at this file; may help with further development.

Thanks
[Windows Mobile Software Development] stan23:
Do the provisioning XML files need to end with .xml or .provxml (Schap's Advanced Config requires the latter)?

Your tool seems to recognize only .xml files.

Moving up and down is a bit tricky, because the selected lines grow and that seems to prevent moving.

Btw, RegDiff is great to generate .reg files out of two exported registry dumps (from registry workshop) or from WinCE Cab Manager (thanks pof).

Then reg-2-XML can convert them to provXML files (thanks dan1967 and bepe).

Now I have done most of my UC preparation but cannot find an UC compliant Hermes ROM :(
[Windows Mobile Software Development] Sleuth255:
provxml & xml differ only by the file extension btw. They are both CSP based xml provisioning docs. hth!
[Windows Mobile Software Development] doedoe:
This is a simple task, and can be ready in a few days.

Can you please gather a list of the standard functions you wanna back up?

I wanna keep this quite device agnostic as possible.
[Windows Mobile Software Development] Noonski:
Hey tnx for the Regdiif app reference WinCeCab Manager i couldn't live without it.
[Windows Mobile Software Development] Sleuth255:
@stan23: I've gotta test sdconfig on hermes so I'll release that one. But it'll be based on 3.1Sleuth for hermes which is probably old as dirt by now. So, I'll also shoot a PM to the Hermes chef du jour if you let me know who that is..
[Windows Mobile Software Development] remlle:
I Dont think I ever saw an answer to if there was a way to copy a whole directory.

is there? IDe like to know cuz I have 1 folder I need to copy and it has over 45 files in it.
[Windows Mobile Software Development] ronald_di:
registry key

hi!

I keep on getting "unable to open registry key" error message in my xda zinc everytime i soft reset.

This happened after my unit suddenly crashed while in standby mode tht i had to do a soft reset.

One of my problems is the applications I added seemed to have been converted into resident applications that they don't appear now in the "programs in memory" in the remove programs. Thus, I cant uninstall them anymore to free up memory.

Hard reset does not do anything about this problem.

What should I do.
[Windows Mobile Software Development] Grumps:
Try and install the app again and then uninstall
[Windows Mobile Software Development] Grumps:
Doesnt pick up all my cabs for some reason. I have 32 cabs in c:\cabs and it only shows 11. I tried taking the read only attribute off but still doesnt work. Any ideas?
[Windows Mobile Software Development] stan23:
CRCinAU wants to make his next WM6.1 UC compliant, and I've already written in Schap's 4.31.Hermes thread he should consider UC compliance :)

I have to pass 6 more exams until the end of February, so I should flash less and learn more for university ;)
[Windows Mobile Software Development] ASerg:
Good idea! Thanks! I Use now in the ROM: HERALD.ASerg.WM6.1.WWE
[Windows Mobile Software Development] _Alex_:
Would it be possible to support XML files to select a list of standard reg keys for backup? Take a look at this app which has since stopped development. Definitely device agnostic, but very application specific :D
[Windows Mobile Software Development] Sleuth255:
Added to the list! :)

btw: just a suggestion but looking at the thread, it was hard to tell. Flashing Junkies might not know your ROMs are UC capable. I always put "This ROM is UC capable" followed by a link to this thread.
[Windows Mobile Software Development] ryano2121:
Provisioning help

am trying to figure out this provisioning stuff. I have read everything I can find, but I can't get it to work.

I tried a simple one, but it doesn't work. If someone could help make this work, I can probably figure out how to do the rest of the things I want to do.

I created an .xml file called _setupxml.xml

This is what I have:

<wap-provisioningdoc>

<!-- Voicemail Settings-->

<characteristic type="Registry">

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

<parm name="UserProvidedNumber1" value="*86p#2121" datatype="string"/>

</characteristic>

</characteristic>

</wap-provisioningdoc>

I created a cab files using both the command prompt and WinCE Cab Manager. I run the cab on my phone and it doesn't change the registry value. If I change the voicemail number in the phone settings, it does show up as changed in the registry.

What am I doing wrong?
[Windows Mobile Software Development] mousio:
Have you tried this yet? (still my favourite ;))
[Windows Mobile Software Development] EGOvoruhk:
Okay, I need a hand with registry editing. I think I've got it down, but is there an issue with editing keys that were already there? I'm basically just trying to disable some home screen items

Here's my code:

<wap-provisioningdoc>

<!-- Disable Getting Started -->

<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Getting Started">
<parm name="Enabled" value="0" datatype="integer"/>
<noparm name="Enabled"/>
</characteristic>

<!-- Disable Live Search -->

<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Windows Live Search">
<parm name="Enabled" value="0" datatype="integer"/>
<noparm name="Enabled"/>
</characteristic>

<!-- Fix Internet Sharing -->

<characteristic type="Registry">
<characteristic type="HKLM\Comm\InternetSharing\Settings">
<parm name="ForceCellConnection" value="Sprint PCS" datatype="string"/>
<noparm name="ForceCellConnection"/>
</characteristic>

I have that as "XML: \Extended_ROM\Fixes.xml". I assumed that would work, because it's next to 2 other XML files that seem to work fine. I see it go through in the customization process

Anyway, any suggestions are welcome. Thanks in advance guys
[Windows Mobile Software Development] AlexVallat:
Yep, that code is a mess, I don't think it's even well-formed XML (which you can test by loading it in a browser). There should be one Registry characteristic, and under that one characteristic per key. The noparm element is used to remove values - I'm guessing this isn't what you actually want to do, as you are also setting the same values!

There's nothing special about updating existing values, the code is the same whether it is updating or creating new.

Try:

<wap-provisioningdoc>
<characteristic type="Registry">
<!-- Disable Getting Started -->
<characteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Getting Started">
<parm name="Enabled" value="0" datatype="integer"/>
</characteristic>

<!-- Disable Live Search -->
<characteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Windows Live Search">
<parm name="Enabled" value="0" datatype="integer"/>
</characteristic>

<!-- Fix Internet Sharing -->
<characteristic type="HKLM\Comm\InternetSharing\Settings">
<parm name="ForceCellConnection" value="Sprint PCS" datatype="string"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>

(Not actually tested, so may still contain errors. Closer, though.)

Alex
[Windows Mobile Software Development] EGOvoruhk:
Excellent, thank you AlexVallat. That seemed to work

You said noparm would be used to remove values. Can you give an example? Can I use it to remove a key as wel, like? "HKLM\SOFTWARE\Microsoft\Today\Items\Getting Started"

Also, is it possible to delete files? I was looking at the Auto Run wiki, and it doesn't look like it's a command, but what about through XML?

Thanks again
[Windows Mobile Software Development] AlexVallat:
Some helpful information

To remove a value:

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Getting Started">
<noparm name="Enabled"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>

To remove a key (according to the documentation. Doesn't seem to work on my Athena, but might be worth a try):

<wap-provisioningdoc>
<characteristic type="Registry">
<nocharacteristic type="HKLM\SOFTWARE\Microsoft\Today\Items\Getting Started" />
</characteristic>
</wap-provisioningdoc>

To remove a file:

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\PathTo\File.ToDelete" translation="filesystem">
<characteristic type="Delete" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

Further Reading: Configuration Service Provider Reference for Windows Mobile Powered Devices

Shamless plug for my own utility to help avoid having to code these things manually: SDConfigGen (also see other posts in this thread for other alternatives)

Alex
[Windows Mobile Software Development] bengalih:
I posted this video so you can see that SASHIMI does exactly what you are asking if you use it in Autorun mode. See VIDEO 10:

http://www.youtube.com/view_play_list?p=A0D550239D3CAE10
[Windows Mobile Software Development] apocalypse333:
Enoug Sashimi already!! I'm hungry for sushi ;). I have a quick question about copying folders.

Say I want to copy "storage card/program files/" (all the folders and files in that folder to "device/program files" What would I need to use as a command.

thanks
[Windows Mobile Software Development] bengalih:
Check out post #709 for DaveShaw's xcopy utility.

There is no way to do this natively with UC. Dave's utility requires you to create a configuration file with the folders you want to copy. This will be parsed when you call his executable from sdconfig.

The other options are to write an XML file that will do it, but this is a time intensive process that must account for every file in the directories (Alex's tool will generate the XML file for you, but must be re-run every time the contents of the folder change).

The only other option is to write a mortscript and use one of the many methods of registering/calling mortscript in UC prior to run.
[Windows Mobile Software Development] apocalypse333:
Thanks, I forgot to mention I already read that thread and have said program. I know how to call it via uc, however it is this I am confused about:

#Test Config File

"\Storage Card\Temp" \Temp

\Temp "\Temp2"

the first line means a comment due to the "#"

however is the second line the source and third ilne the destination?

If so, does that mean he is copying in the ex the temp folder and its contents from the storage card to the temp folder on the device?

so then what is with the temp2 and the extra parameters outside of the "".

What I'd like is to simply copy my program files folder with all its included folders and files to program files on the device itself. If you could just write me this command to make it clear.

thanks.
[Windows Mobile Software Development] jambrose:
Trying to get UC to install a couple of CABs and because of the installer asking for other input than installing to the device it stops and locks up. Attached is the screen shots of the input screens for the installation. Is there something I can put in the SDconfig.txt file to accept the input screen and move on in the installation.

Also attached is the provisioning.xml file that seems to not work at all as well.
[Windows Mobile Software Development] bengalih:
He explains it clearly in the post I refered you to:

By that rationale, the syntax for you should be:

# Spoonfed xcopyce file
"\Storage Card\Program Files" "\Program Files"
[Windows Mobile Software Development] bengalih:
If you are saying that you are unable to click on the screen to install the CAB, then what you need to do is take the LOCK: command out of your sdconfig.txt.

If you are asking to AUTOMATE the installation by having it click on those things for you, the answer is NO. UC has no ability to automate interactive CAB installs.

I would suggest looking at some of the UC replacements/enhancements that enable you to use MortScript to send automation if that is what you are interested in.

As far as your XML. I would recommend that since you are just trying to do registry entries that instead you create yourself a .REG file, which has much easier syntax. Then download regtoxml and convert it.
[Windows Mobile Software Development] jambrose:
So if I take out the lock command then I will be able to interact with the installation? I tried the reg2xml and it didn't work at all. Here is one XML file that I tried on a reg file:

<wap-provisioningdoc>
<!-- *** COMMENTO *** -->
<characteristic type="Registry">
<characteristic type=" H K E Y _ C U R R E N T _ U S E R \ C o n t r o l P a n e l \ B a c k L i g h t " translation="filesystem">
</characteristic>
</characteristic>
</wap-provisioningdoc>

This was just to change the backlight settings and no registry settings shows up in the XML file.
[Windows Mobile Software Development] apocalypse333:
thanks for the help, the reason it was confusing is since the ex:

#Test Config File

"\Storage Card\Temp" \Temp

\Temp "\Temp2"

does that mean, copy storage card\temp to device\temp

and then copy \temp on device to temp2?

thanks.
[Windows Mobile Software Development] bengalih:
That's correct. One line per xcopy operation.
[Windows Mobile Software Development] nikagl:
Hey Dave,

Does this also overwrite Read Only files? If not, can you add that? See Sashimi thread for why we'd need it ;)

Regards,

Nika.
[Windows Mobile Software Development] datapusher:
When opening pictures & video, is there a way to default to the storage card for viewing instead of the device?

I figure this must be a reg setting I can put into my prov file
[Windows Mobile Software Development] staty:
Whan copying a file from one place to another, is it allowed to use Spaces in the Command?

Like:

CPY2:\My Documents\...

Or do I have to insert a "_" between My and Documents?

And if I want to copy to My Documents\Klingeltöne (Ringtones) Do I have to write Klingeltöne or do I hev to write ringtones?
[Windows Mobile Software Development] l3v5y:
CPY1 and CPY2 do not work for directories, for directories, use DaveShaws XCopyCE.

You need to write the paths as they appear on device, with spaces if there are spaces, and in whatever language they are on the device.
[Windows Mobile Software Development] nikagl:
Or look into Sashimi - I'd really recommend using it, it gives most UC has and more... I use a combi of both, and it's great!! :D
[Windows Mobile Software Development] DaveShaw:
Hi All,

Due to more updates been made by me xcopyce development has now moved to it's own thread.

@Sleuth / l3v5y, can you update the OP with the new link.

Thanks

Dave
[Windows Mobile Software Development] undac:
I was wondering if anyone knew what registry settings control the Regional Settings?

I've done a pretty advanced setup (hundered lines of code thus far and I fear I'm far from done ;) ) but I still can't figure out how to set my region to Swedish (not talking about timezone, keyboard etc., I'm talking currency, date representation etc.)
[Windows Mobile Software Development] DaveShaw:
Here is my Locale Changing ProvXML (For the UK):

<!-- Locale -->
<characteristic type="HKLM\nls" translation="filesystem">
<parm name="DefaultOCP" datatype="integer" value="850"/>
<parm name="DefaultACP" datatype="integer" value="1252"/>
<parm name="DefaultLCID" datatype="integer" value="2057"/>
<parm name="SystemLCID" datatype="integer" value="1033"/>
<parm name="LegacyLocaleMode" datatype="integer" value="1"/>
</characteristic>
<characteristic type="HKLM\nls\overrides" translation="filesystem">
<parm name="LCID" datatype="integer" value="2057"/>
</characteristic>

Ta

Dave
[Windows Mobile Software Development] nikagl:
And I use the following registry file (with Sashimi):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\nls]
"DefaultOCP"=dword:00000352
"DefaultACP"=dword:000004E4
"DefaultLCID"=dword:00000809
"SystemLCID"=dword:00000409
"LegacyLocaleMode"=dword:00000001

[HKEY_LOCAL_MACHINE\nls\overrides]
"IDigt"=dword:00000002
"SSDTe"="d-M"
"ITMPN"=dword:00000009
"ITLZr"=dword:00000001
"ITime"=dword:00000001
"STime"=":"
"STFmt"="HH:mm:ss"
"SCrcy"="€"
"LCID"=dword:00000809
"SDate"="/"
"IDate"="0"
[Windows Mobile Software Development] king.7070:
how aboutLG KS20 .............]ls:)
[Windows Mobile Software Development] undac:
Thanks mate. I discovered another problem running my script.

I'm sure you can see what I've trying to do (copy MP3 from SD to device, set MP3 as ringtone and set it to "Vibrate and Ring")

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Storage Card\Music\Swizz Beatz\J. Armz-How To Be An MC Vol. 42" translation="install">
<characteristic type="MakeDir" />
<characteristic type="23-swizz_beatz-its_me_bltches_(prod._by_swizz_beats).mp3" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\My Device\My Documents\My Ringtones\23-swizz_beatz-its_me_bltches_(prod._by_swizz_beats).mp3" translation="install" />
</characteristic>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Sounds\RingTone0" recursive="true">
<parm name="SavedSound" value="\My Documents\My Ringtones\23-swizz_beatz-its_me_bltches_(prod._by_swizz_beats).mp3" datatype="string"/>
<parm name="Sound" value="\My Documents\My Ringtones\23-swizz_beatz-its_me_bltches_(prod._by_swizz_beats).mp3" datatype="string"/>
<parm name="Script" value="av0pw3r" datatype="string"/>
<parm name="Category" value="Ring" datatype="string"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>

Problem is: nothing gets copied to My Ringtones and the ringer is still set to just ring.

I tried using My Device first and I also tried without it, I figure I'm not settings the path correctly (I've only dealt with stuff withing windows using the "shortcut" parameters and that works fine for me)