[Windows Mobile Software Development] Sleuth255:
File Operation CSPs

All the File Operation CSP parameters are described here.

Here's mine:

<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>

%CE2% is a shorthand way for saying "\windows". As you can see, the first characteristic types set the working directory to \windows\startup, the destination file to "StartTimeSync.lnk" and the file operation to "Copy". Finally, the source file is set and the CSP copies \windows\SP TimeSync.lnk to \windows\startup\StartTimeSync.lnk.

Here's a great example from booda. It shows shortcut creation, move, directory creation and remove operations:

<characteristic type="FileOperation">

<!--Create folder in Programs called "Docs and Ref" and move Google Maps shortcut into it-->

<characteristic type="%CE2%\Start Menu\Programs\Docs and Ref" translation="install">
<characteristic type="MakeDir" />

<characteristic type="Google Maps.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE2%\Start Menu\Programs\Google Maps.lnk" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

<!--Create "Doom" shortcut from exe on storage card and copy it into Games folder-->

<characteristic type="%CE2%\Start Menu\Programs\Games" translation="install">
<characteristic type="MakeDir" />

<characteristic type="gfDoom.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Storage Card\Games\Doom\gfDoom.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

<!-- Move Office folder from Start Menu into Docs and Ref folder -->

<characteristic type="%CE2%\Start Menu\Programs\Docs and Ref\Office Mobile" translation="install">
<characteristic type="MakeDir" />

<characteristic type="Excel Mobile.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE2%\Start Menu\Programs\Office Mobile\Excel Mobile.lnk" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="icon.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE2%\Start Menu\Programs\Office Mobile\icon.lnk" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="OneNote Mobile.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE2%\Start Menu\Programs\Office Mobile\OneNote Mobile.lnk" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="PowerPoint Mobile.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE2%\Start Menu\Programs\Office Mobile\PowerPoint Mobile.lnk" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="Word Mobile.lnk" translation="install">
<characteristic type="Move">
<parm name="Source" value="%CE2%\Start Menu\Programs\Office Mobile\Word Mobile.lnk" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

<characteristic type="%CE2%\Start Menu\Programs\Office Mobile" translation="install">
<characteristic type="RemoveDir" />
</characteristic>

</characteristic>

Here are all the %CE#% shortcuts (thanks to chainfire)

%CE1%	\Program Files
%CE2%	\Windows
%CE3%	***Not Defined***
%CE4%	\Windows\Startup
%CE5%	\My Documents
%CE6%	\Program Files\Accessories
%CE7%	\Program Files\Communication
%CE8%	\Program Files\Games
%CE9%	***Not Defined***
%CE10%	***Not Defined***
%CE11%	\Windows\Start Menu\Programs
%CE12%	\Windows\Start Menu\Programs\Accessories
%CE13%	\Windows\Start Menu\Programs\Communication
%CE14%	\Windows\Start Menu\Programs\Games
%CE15%	\Windows\Fonts
%CE16%	***Not Defined***
%CE17%	\Windows\Start Menu

EMAIL2 CSPs

All the EMAIL2 CSP provisioning parameters are described here

Elosogrande7076 shows us how to provision a couple of email accounts below. To be safe, use GUID-GEN to generate unique GUIDs. This is because duplicate GUIDs will cause undefined results on your device.

<wap-provisioningdoc>
<characteristic type="EMAIL2">
<characteristic type="{7B3D74EC-35D9-45e3-B8F3-E38F4B90D174}">
<parm name="SERVICENAME" value="Gmail" />
<parm name="SERVICETYPE" value="IMAP4" />
<parm name="INSERVER" value="imap.gmail.com" />
<parm name="OUTSERVER" value="smtp.gmail.com" />
<parm name="NAME" value="Username" />
<parm name="AUTHNAME" value="login@gmail.com" />
<parm name="AUTHSECRET" value="password" />
<parm name="DOMAIN" value="" />
<parm name="REPLYADDR" value="login@gmail.com" />
<parm name="LINGER" value="15" />
<parm name="RETRIEVE" value="-1" />
<parm name="KEEPMAX" value="-1" />
<parm name="DWNDAY" value="3" />
<parm name="AUTHREQUIRED" value="1" />
<parm name="SMTPALTENABLED" value="1" />
<parm name="SMTPALTAUTHNAME" value="login@gmail.com" />
<parm name="SMTPALTPASSWORD" value="password" />
<parm name="SMTPALTDOMAIN" value="smtp.gmail.com" />
</characteristic>
</characteristic>
<characteristic type="EMAIL2">
<characteristic type="{877e6100-cd6d-4a44-bd4c-3edf4b901480}">
<parm name="SERVICENAME" value="Gmail1" />
<parm name="SERVICETYPE" value="IMAP4" />
<parm name="INSERVER" value="imap.gmail.com" />
<parm name="OUTSERVER" value="smtp.gmail.com" />
<parm name="NAME" value="Username" />
<parm name="AUTHNAME" value="login1@gmail.com" />
<parm name="AUTHSECRET" value="password1" />
<parm name="DOMAIN" value="" />
<parm name="REPLYADDR" value="login1@gmail.com" />
<parm name="LINGER" value="15" />
<parm name="RETRIEVE" value="-1" />
<parm name="KEEPMAX" value="-1" />
<parm name="DWNDAY" value="3" />
<parm name="AUTHREQUIRED" value="1" />
<parm name="SMTPALTENABLED" value="1" />
<parm name="SMTPALTAUTHNAME" value="login1@gmail.com" />
<parm name="SMTPALTPASSWORD" value="password1" />
<parm name="SMTPALTDOMAIN" value="smtp.gmail.com" />
</characteristic>
</characteristic>
</wap-provisioningdoc>

XML Creation FAQ

Its probably a syntax error. Here's how I debug syntax:

first obtain a cab creation utility. For windows I use Cabarc, a free m$ utility

you can then rename your xml to _setup.xml and double click to load it into a browser. This will verify that your <tag></tag> nesting is correct along with validating tag statements. IE won't load an xml file in display mode if this isn't correct. As an added benefit, the error message will point to the exact line where the error occurs.

If it looks good, make a cab containing only _setup.xml itself and run it on your device. If the xml is good, installation will be successful & your changes will be made

if unsuccessful, use successive installs to isolate the part that isn't working.

Being a Mac user, ymmv on this, but my technique using Windows is as follows:

create a Unicode file with your favorite text editor and enter your owner name (I use Windows Notepad for this, not sure what a Mac uses). Then pad it out to 320 characters with "%" characters.

now open that file with a Hex editor and do a global Hex replace on 25 (the hex representation of a "%") to 00. This produces a file containing the Unicode representation of your Owner name padded with binary zeros. I use WinHex for this btw.

Now browse to this site and select the file you've just created. Press "Convert the Source data". The Base64 data will appear.

Copy data to clipboard, paste into your editor (make sure word wrap is off) and remove all the newline characters (go to beginning of each line starting from bottom & press backspace). when complete, you will have one single line of base64 data. Now copy to clipboard & paste into my example.

Done!

Update: RapiConfig might be faster. See stan23's post located here. Download link is included.