yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] RoryB:
Move the last </characteristic> above registry to close file operation before starting registry.

If it still does not work after that you can try making a separate xml file for Email2 from the registry and file operations.

<wap-provisioningdoc>
<characteristic type="EMAIL2" recursive="true">
<characteristic type="{6E1145C4-F35F-0EC9-182D-F73C2DCBEFD7}">
<parm name="SERVICENAME" value="Gmail"/>
<parm name="SERVICETYPE" value="IMAP4"/>
<parm name="INSERVER" value="imap.gmail.com"/>
<parm name="AUTHNAME" value="blahblahblueblue"/>
<parm name="AUTHSECRET" value="aaaaaaaaaaaaaa"/>
<parm name="DOMAIN" value=""/>
<parm name="OUTSERVER" value="smtp.gmail.com"/>
<parm name="REPLYADDR" value="blahblahblublue@blah.com"/>
<parm name="SMTPALTAUTHNAME" value="blahblahblublue@blah.com"/>
<parm name="SMTPALTDOMAIN" value=""/>
<parm name="NAME" value=""/>
<parm name="LINGER" value="15"/>
<parm name="RETRIEVE" value="51200"/>
<parm name="KEEPMAX" value="4294967295"/>
<parm name="DWNDAY" value="3"/>
<parm name="FORMAT" value="2"/>
<parm name="AUTHREQUIRED" value="1"/>
</characteristic>
</characteristic>

<characteristic type="FileOperation">

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

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

<characteristic type="Battery Monitor.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\BatteryMonitor.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="Camera.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\Camera.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="File Explorer.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\fexplore.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="PHM RegEdit.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Program Files\PHM Tools\regedit.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="psShutXP.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="Program Files\psShutXP\psShutXP.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

<characteristic type="Registry">
<characteristic type="HKLM\Software\HTC\EnlargeMenu">
<parm name="Enable" datatype="integer" value="1"/>
</characteristic>
</characteristic>

</wap-provisioningdoc>
[Windows Mobile Software Development] reigndropz:
Tried that...no good. Is opening it up in IE a good way to "test" it? Becuase that is what I have been doing to see if I dont get the error.
[Windows Mobile Software Development] RoryB:
Open it in XML notpepad to see errors in syntax.
[Windows Mobile Software Development] reigndropz:
I did that with the code I took from your last post. It says "the wap-provisioningdoc start tag on line 1 does not match the end tag </charateristic> line 35 position 3

edit* i think I got it. i made a separate one just for start menu and it gave me no errors. I added another </characteristic> at the end of the removedir command. I guess what I will do is have 3 separate xml's. one for the email, the registry and the start menu. I should be ok with that right? you cant have problems making separate xml's run can you?

Also, is there a way I can test the xml on the device without having to reflash it?
[Windows Mobile Software Development] RoryB:
You can run xml files through task manager under menu\actions\ install provision.XML or with Advanced config tool.
[Windows Mobile Software Development] reigndropz:
Ah thanks so much. However, even though I get no errors on the program, when I install the provision, it says The XML is invalid or malformed. here is the complete code just for the start menu right now.

<wap-provisioningdoc>

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

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

<characteristic type="Battery Monitor.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\BatteryMonitor.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

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

<characteristic type="Camera.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\Camera.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

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

<characteristic type="File Explorer.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\fexplore.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

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

<characteristic type="PHM RegEdit.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Program Files\PHM Tools\regedit.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

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

<characteristic type="psShutXP.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="Program Files\psShutXP\psShutXP.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

</wap-provisioningdoc>
[Windows Mobile Software Development] RoryB:
Try this, add the red and delete the

underlined

<wap-provisioningdoc>

[B][COLOR=red]<characteristic type="file operation">[/COLOR][/B]

[U]<characteristic type="%CE2%\Start Menu\" translation="install">[/U]
[U]<characteristic type="RemoveDir" />[/U]
[U]</characteristic>[/U]

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

<characteristic type="Battery Monitor.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\BatteryMonitor.exe" translation="install"/>
</characteristic>
</characteristic>

[U]</characteristic>[/U]

[U]<characteristic type="%CE2%\Start Menu\" translation="install">[/U]
[U]<characteristic type="MakeDir" />[/U]

<characteristic type="Camera.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\Camera.exe" translation="install"/>
</characteristic>
</characteristic>

[U]</characteristic>[/U]

[U]<characteristic type="%CE2%\Start Menu\" translation="install">[/U]
[U]<characteristic type="MakeDir" />[/U]

<characteristic type="File Explorer.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\fexplore.exe" translation="install"/>
</characteristic>
</characteristic>

[U]</characteristic>[/U]

[U]<characteristic type="%CE2%\Start Menu\" translation="install">[/U]
[U]<characteristic type="MakeDir" />[/U]

<characteristic type="PHM RegEdit.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Program Files\PHM Tools\regedit.exe" translation="install"/>
</characteristic>
</characteristic>

[U]</characteristic>[/U]

[U]<characteristic type="%CE2%\Start Menu\" translation="install">[/U]
[U]<characteristic type="MakeDir" />[/U]

<characteristic type="psShutXP.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="Program Files\psShutXP\psShutXP.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

[B][COLOR=red]</characteristic>[/COLOR][/B]

</wap-provisioningdoc>
[Windows Mobile Software Development] RoryB:
Sorry about that, I forgot "type" on the file operation.

To delete a directory you have to first delete all files in the directory and then the directory, which gets nasty when you have sub-directories.

Follow this as a guide.

<characteristic type="file operation">

<characteristic type="\%CE2%\Start Menu\Programs\Manilla2D-DevTools\Manilla2D-DevTools-Settings.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>

<characteristic type="\%CE2%\Start Menu\Programs\Manilla2D-DevTools" translation="install">
<characteristic type="RemoveDir" />
</characteristic>

</characteristic>
[Windows Mobile Software Development] reigndropz:
oh man.....isnt there a way where I can just delete the entire directory and then makedir to add what i want in there? This is only for the start menu, so they're just the shortcuts. Because if what your saying is the only way. I'd have to reflash just to find out what exactly IS in the directory at first....
[Windows Mobile Software Development] RoryB:
You could use Mortscript deltree command to remove \windows\start menu and its contents.

You would need to install the mortscipt cab and exec the script before you run your file operation xml.

Your sdconfig.txt would have

CPY1:\storage card\SDAUTO\delstartmenu.mscr

CPY2:\delstartmenu.mscr

CAB: \storage card\SDAUTO\mortscript.cab

EXEC:\delstartmenu.mscr

XML: fileoperation.xml

and your script would have

Deltree( "\windows\start menu" )

delete( "\delstartmenu.mscr","TRUE" )

This way it deletes itself when done
[Windows Mobile Software Development] reigndropz:
Great thanks!! I just checked after removing all the shortcuts in the start menu and running the xml, it still didnt put the shortcuts there lol. Man, back to square 1. Thanks again so much for your help.
[Windows Mobile Software Development] RoryB:
First try changing %CE2% to be \windows then try this, I think some of the translation="install" are not needed. delete the underlined ones.

[COLOR=black]<wap-provisioningdoc>[/COLOR]

[COLOR=black]<characteristic type="file operation">[/COLOR]

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

<characteristic type="Battery Monitor.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\BatteryMonitor.exe" [U]translation="install"[/U]/>
</characteristic>
</characteristic>

<characteristic type="Camera.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\Camera.exe" [U]translation="install"[/U]/>
</characteristic>
</characteristic>

<characteristic type="File Explorer.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\fexplore.exe" [U]translation="install"[/U]/>
</characteristic>
</characteristic>

<characteristic type="PHM RegEdit.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Program Files\PHM Tools\regedit.exe" [U]translation="install"[/U]/>
</characteristic>
</characteristic>

<characteristic type="psShutXP.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="Program Files\psShutXP\psShutXP.exe" [U]translation="install"[/U]/>
</characteristic>
</characteristic>

</characteristic>

[COLOR=black]</characteristic>[/COLOR]

</wap-provisioningdoc>
[Windows Mobile Software Development] RoryB:
I just noticed psshutxp did not have a "\" in front of the "Program Files"
[Windows Mobile Software Development] RoryB:
My last hope to help:

<wap-provisioningdoc>

[COLOR=black]<characteristic type="file operation">[/COLOR]

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

<characteristic type="Battery Monitor.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\BatteryMonitor.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="Camera.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\Camera.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="File Explorer.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\fexplore.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="PHM RegEdit.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Program Files\PHM Tools\regedit.exe" translation="install"/>
</characteristic>
</characteristic>

<characteristic type="psShutXP.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="\Program Files\psShutXP\psShutXP.exe" translation="install"/>
</characteristic>
</characteristic>

</characteristic>

[COLOR=black]</characteristic>[/COLOR]

</wap-provisioningdoc>
[Windows Mobile Software Development] m.klinge:
Bump for help :)

This script dosnt work as intended - anybody who can give a clue on why?

<wap-provisioningdoc>

<characteristic type="Registry">
<!-- Keyboard layout -->
<characteristic type="HKLM\HARDWARE\DEVICEMAP\KEYBD">
<parm name="CurLang" value="1044" datatype="integer"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>

//M
[Windows Mobile Software Development] reigndropz:
Sorry man, no good. I thank you for trying so much for me, you've been pretty much the only one really helping me with this. Thank you for your time and patience. I'll figure this out one way or another eventually.
[Windows Mobile Software Development] RoryB:
Good luck

Have you tried just one shortcut? Also, I think if one exists already the xml fails without error message.
[Windows Mobile Software Development] RoryB:
Try this

<wap-provisioningdoc>
<characteristic type="Registry">
<!-- Keyboard layout -->
<characteristic type="HKLM\HARDWARE\DEVICEMAP\KEYBD" translation=''install">
<parm name="CurLang" value="1044" datatype="integer"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
[Windows Mobile Software Development] reigndropz:
yes. i tried just one. still the same thing :-\
[Windows Mobile Software Development] m.klinge:
Edit: I cleared up the code abit - there was missing a space and there was one " too many, but it dosnt seem to help, but now ie dosnt seem to give me a error ^^

Hmm that didnt help either - but thx for the try, ie gives me a error that states that the blanksign (Whatever that means) are missing?

//M
[Windows Mobile Software Development] RoryB:
Try XML notepad it gives you line and character position of the error.
[Windows Mobile Software Development] m.klinge:
After i cleared up the code abitg i dont get any error - however nothing happens anyway (See my edit of the post) :)

//M
[Windows Mobile Software Development] RoryB:
One thing I just remembered. XML notepad adds a line of code to your file. Afterwards, I open the file in regular notepad, delete the first line and save as UNICODE with txt clanged to all file types.
[Windows Mobile Software Development] irus:
hoping someone can help

ok im trying to get my push email settings to work from hard reset. i used rapiconfig to get the settings. i have tried using sdautorun to install the xml file no luck i also tried putting it in a cab file no luck i also tried adding it to an existing provxml in the rom still no luck so i was hoping someone could help. also i tried what sleuth said and rename it _setup.xml and opening it in IE and it open find so im not sure what is wrong. i am using rom 5.08 build 20771 touch pro. i attached a file hope someone can look at it and help. thanks
[Windows Mobile Software Development] RoryB:
I have not been able to get activesyn (push) email to setup through xml file. I do have Email2 and WiFi set up working with the passwords preset. All I have to do is adjust the mail settings that are part of the vol files mentioned earlier in this thread. I have not been able to get the vol trick to work.

I have not finished playing with activesync starting through UC.

I think it has a need for more things than just the "sync" settings from rapiconfig. Perhaps some settings in the registry have to be done too.
[Windows Mobile Software Development] garyfunk:
There is an example in my signature
[Windows Mobile Software Development] irus:
which vol files do you think it is... pim.vol?
[Windows Mobile Software Development] irus:
i looked through the uc.zip files and i don't see anything about backing up my bluetooth devices. did i miss something?
[Windows Mobile Software Development] RoryB:
garyfunk said cemail.vol and pim.vol. I tried it using the mortscript routine, and it did set up some things. It did not work completely.

http://xdaforums.com/showthread.php?p=3429414#post3429414

http://xdaforums.com/showpost.php?p=3429414&postcount=1060
[Windows Mobile Software Development] irus:
ok so im not sure where exactly but it is more than just files. i used sprite backup to test push mail and bluetooth devices and if i just backup files but no reg settings then it does not work but if i backup everthing it works. so im just going to cheat and have this load on first boot. :D
[Windows Mobile Software Development] m.klinge:
Hmm ive also tried this but no help :(

//M
[Windows Mobile Software Development] dharvey4651:
Okay here is my dilemma. I am cooking a ROM and in my ROM has an un-registered version of Resco Explorer.

I'm trying to get the Registry Add-in of Resco Explorer to install during customizations. It's not big feat I know but I'm a perfectionist and it's just bugging me that the setup.dll is putting the shortcut in \Start Menu\Programs.

What I want to do:

1. Move "Resco Registry.lnk" to \Windows\Start Menu\Tools\System Utilities"

2. Rename "Resco Registry.lnk" to "Registry Editor.lnk"

I would like to do this via XML or Post XML in the cab file. My hope is that someone here can help me create an XML that will do exactly this.

Ideally, I would like to have Resco Registry.cab install during customizations and then have customizations execute *.XML that will perform the above tasks.

If anyone here thinks they can help me, please help. I'm desperate.

Thanks in advance, Dan.
[Windows Mobile Software Development] leary:
I don't think this has been posted, if it has, i'm sorry. Anyway, I can get all of my mail settings right except for setting the behavior when you delete an item (move to server trash, keep on server et al.) Any advice would be great.
[Windows Mobile Software Development] irus:
r u talking about push mail or pop/imap mail? if its push mail can you explain how to get the push mail settings to restore after hard reset. this used to work on my old phone but it does not work anymore. i even download a cab stright from mail2web website and still would not input my settings but it used to do that so im not sure what changed. hope you or someone can help or i will be forced to goto imap :(
[Windows Mobile Software Development] leary:
pop/imap.

@irus: maybe send a mail to mail2web asking them
[Windows Mobile Software Development] scuccia:
I think this should do it. This will copy and rename the link and then delete the original.

I tested this on my device and it did exactly what you are wanting to do.

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="%CE11%\Tools\System Utilities" translation="install">
<characteristic type="MakeDir" />
<characteristic type="Registry Editor.lnk" translation="install">
<characteristic type="Copy">
<parm name="Source" value="%CE11%\Resco Registry.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="%CE11%\Resco Registry.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

EDIT: If you want to test it you can use AdvancedConfig to import the XML.
[Windows Mobile Software Development] dharvey4651:
WOW thank you VERY much!!! I will test this right now and report my results. I need to rebuild anyway :D

EDIT::: WORKED LIKE A CHARM!!! Thanks a million man!!
[Windows Mobile Software Development] scuccia:
You got it, hopefully I saved you some time so you can work on Rhodium Manila... :D
[Windows Mobile Software Development] dharvey4651:
Hehe yep well once its complete I'm going to be building a new ROM streamlined to run just like a rhodium ;)

Not all apps of course, only the important ones. :D
[Windows Mobile Software Development] m.klinge:
<wap-provisioningdoc>

<characteristic type="Registry">
<!-- Keyboard layout -->
<characteristic type="HKLM\HARDWARE\DEVICEMAP\KEYBD">
<parm name="CurLang" value="1044" datatype="integer"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>

Im still having trouble getting this to work - does anybody have a clue on what im doing wrong? If you want to test you can easily test it yourself, by using the value i do the @ should be when you press Fn + P :)

//M
[Windows Mobile Software Development] m.klinge:
Im so sorry for any posts before this one - i simply forgot to make the correct command in the sd config file - i used the CAB command to try to execute the xml file :(

Jeez i feel stupid, but at least i learned the hard way to check my code for errors ^^

//M
[Windows Mobile Software Development] m.klinge:
Hmm ok now ive checked, checked and double checked nothing wrong with my code now - but im not even able to make the changes thats in the original post to the reg file - the SDConfig are loaded correct because the cabs are installed properly, but the reg edit just wont happen :(

//M
[Windows Mobile Software Development] leary:
i ended up putting all of my registry stuff in a cab.
[Windows Mobile Software Development] m.klinge:
I finally got it working :)

//M
[Windows Mobile Software Development] RoryB:
I just tried this today and it worked for me.

I made a xml of the HKCU\Software\Microsoft\Activesync and HKCU\Software\Microsoft\Activesync\Partners area of my registry. I only picked the partnership that was my Exchange Server and not my PC. I added the <parm name="Password" value="xxxxxxxxxxx"/> to the partnership.

I used the mortscript routine to back up my cemail.vol and pim.vol files. I wrote a mortscript to copy these files back to the root directory.

My UC copies the mortscript to \windows\startup folder.

When my UC finishes, my phone resets and the script runs. The last line of the script deletes itself so it only runs the one time.

Then I ran the ActiveSync.xml file.

It worked, but it did ask me for my email password again when I connected to the PC. My guess is if I had xml'd both partnerships and added the password = line to both, it would not have asked this.
[Windows Mobile Software Development] kockroach:
Thanks for the suggestion Rory. I will take a look at that.

EDIT: So I think I have what I need. I am not too familiar with MortScript. Can you recommend a place to start? I want to see if I can set up a script to run after the reset from UC. The script would run activesync, then copy a file over from the storage card to the "windows\activesync" directory, then delete the script.

I appreciate the point in the right direction.
[Windows Mobile Software Development] irus:
google mortscript and download the manual its a really easy language to learn. i learned it just by seeing examples in the manual.
[Windows Mobile Software Development] RoryB:
Mortscript http://www.sto-helit.de/index.php?module=page&entry=ms_overview&action=view&menu=29

Copy( "\Storage Card\Backup\cemail.vol","\cemail.vol",TRUE )
Copy( "\Storage Card\Backup\pim.vol","\pim.vol",TRUE )
Delete( "\Windows\StartUp\astartup.mscr" )

Some Examples http://xdaforums.com/showthread.php?t=289197

I use sdconfig.txt to copy astartup.mscr from storage card to \windows\startup
[Windows Mobile Software Development] m.klinge:
So Im kinda getting the hang of this - and its just getting better and better (And so am I) :)

Ive gotten it to automaticly display my regional settings by using CeRegistryEditor (What a powerfull tool for this kinda work) :)

I really want to be able to set my connection automaticly as well - but it dosnt seem it can be done right out of the box - anybody has some info on that? It seems theres alot of registry files that needs to be edited?

Kind regards

//M