How to Delete! - Windows Mobile Development and Hacking General

I am writing the following code in a _Setup.xml file to delete a shortcut.
<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Windows\Start Menu\Programs\Pictures & Videos.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
<parm name="SelfRegister" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
there is a problem with the "&" character in the file name.
I am assuming xml doesn't support deleting a file which has a special character in its name.
How how do I delete it?

No replies?!?!?

The & character represent escape string in XML.
You may try replace & with & so the string should be "\Windows\Start Menu\Programs\Pictures & Videos.lnk"
Please let me know if this helps

try && instead of &

Lagz0ne said:
The & character represent escape string in XML.
You may try replace & with & so the string should be "\Windows\Start Menu\Programs\Pictures & Videos.lnk"
Please let me know if this helps
Click to expand...
Click to collapse
It worked God bless you!!!!
I actually went mad figuring it out!!!
Thanks a lot...

6Fg8 said:
try && instead of &
Click to expand...
Click to collapse
&& doesn't work..!

Related

Convert *.reg to *.xml

Someone knows how to convert *. reg file to *. xml? (with a tool )
Exemple :
Code:
[HKEY_LOCAL_MACHINE\Software\HTC\Biotouch\APLauncher\App1]
"Name"="Opera Browser"
"Param"=""
"Path"="\\Windows\\OperaL.exe"
to this format
Code:
<wap-provisioningdoc>
<!-- Optimize system -->
<characteristic type="Registry">
<characteristic type="HKLM\System\GDI\GLYPHCACHE" translation="filesystem" >
<parm name="limit" datatype="integer" value="32768" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
Thanks in advance
rgu-2-XML can do that (written by bepe)
Fantastic! Exactly what I wanted! Thank you very much

undo HTC+Touch+Dual-default-ABC.cab

Hi all,
I have a touch dual I've launched the HTC+Touch+Dual-default-ABC.cab file to set the "abc" as default instead of the "XT9" but I was wondering how I can go back to the normal (XT9-default) situation?
Cheers
B
Have you tried to uninstall the cab through Settings -> System -> Remove Programm?
tried it... but the cab isn't mentionned in the list strangly enough...
nobody? is there a way that I can "read" the cab so I know which registry settings have been altered?
cheers
B
I think I've got it, I've installed MSCEInf (freeware) and looked around a bit in the CAB until I noticed an XML with following content:
Code:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\Tegic\eT9\IME" translation="filesystem" >
<parm name="CarrierDefaultTextMode" datatype="integer" value="0" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
I've altered the value to 1 and XT9 was back to default
Cheers
B
berre said:
I think I've got it, I've installed MSCEInf (freeware) and looked around a bit in the CAB until I noticed an XML with following content:
Code:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\Tegic\eT9\IME" translation="filesystem" >
<parm name="CarrierDefaultTextMode" datatype="integer" value="0" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
I've altered the value to 1 and XT9 was back to default
Cheers
B
Click to expand...
Click to collapse
Is there no easier solution to do this? Like another CAB file for example
would be great indeed but I didn't find it anywhere so I started playing around in the registry until I found it...
cheers
B
easier??!! you too lazy reg edit 1 value??!! blimey o'riley! i think you'd rather order takeout than open a tin of beens!

Could someone please review my .XML code? (new to provisioning)

As mentioned in the title, I am trying to get my feet wet with .xml provisioning. (Specifically with .XML provisioned registry settings.) After researching, I understand that registry settings and XML provisioning can get pretty tricky and as well as quite complex. So I decided to start small with keyboard layout, customizing SK2 on the today screen and changing my S2U2 background.
I am having problems getting my .XML files to work and can't tell if its my .xml documents or if its my method of loading the files. Because of this, I was hoping someone could take a look at my code and let me know where my mistakes lay.
Keyboard Layout:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\OEM\Qwerty\">
<parm name="Layout" datatype="DWORD" value="132100" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
SK2 on the todayscreen:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKCU\Software\Microsoft\Today\Keys\112">
<parm name="Default" datatype="String" value="Google Maps" />
<parm name="Open" datatype="String" value="\Program Files\GoogleMaps\GoogleMaps.exe" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
S2U2 Wallpaper:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKCU\Software\A_C\S2U2\">
<parm name="Wallpaper" datatype="String" value="\My Documents\My Pictures\Album Sample_07.jpg" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
Thanks!
-hier0
try adding (translation="filesystem") to any line that has a backslash or is a system path like so:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKCU\Software\Microsoft\Today\Keys\112" translation="filesystem">
<parm name="Default" datatype="String" value="Google Maps"/>
<parm name="Open" datatype="String" value="\Program Files\GoogleMaps\GoogleMaps.exe" translation="filesystem"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
please let us know if this solves your problem...
That didn't work either =\
Maybe, I am incorrectly creating the .xml file itself. I have tried two method of doing so: Notepad and Dreamweaver.
Are these the correct steps for creating an xml document in notepad?
1. Open Note Pad
2. Paste my xml code:
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKCU\Software\Microsoft\Today\Keys\112" translation="filesystem">
<parm name="Default" datatype="String" value="Google Maps"/>
<parm name="Open" datatype="String" value="\Program Files\GoogleMaps\GoogleMaps.exe" translation="filesystem"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
3. Save the document as "filename.xml"
are there any other tags that i need to include either before or in between the <wap-provisioningdoc> tag?
[EDIT] I am not sure if it helps or not but the error i am getting when installing/loading the file is : "unknown error occured: 0x80004005"
save it to your desktop and open it in IE
If the format is correct, you can open and expand/collapse the keys
how are you trying to install it?
As far as I know, you have to create a cab file to install it...
rename to "_setup.xml" and use "makecab.exe" like this at the command line:
makecab _setup.xml cabname.cab
Hi, For registry xml provisioning, if you have sktools 4.7, you can export the keys from registry and use the functionality build cab from reg. Then you open the cab with winzip, view the _setup xml file and copy to your xml file as a scheleton. Remove the first characteristics (they rule the cab itself) and copy when it says caracteristic registry.
There are also tools like reg to xml but they require cf 2.0 in the pc.
for email and wifi the easiest way is to do it with sashimi-makisu.
the only thing I saw compared with my files is that datatype is always at the end in my files, after the value. I have never use the one "DWORD": only string, integer, binary.
I usually import with sdcsoft task manager, the message you get, in my experience means it is well formed (try opening with ie as commented in previous tag), but the commands can not be executed.
AFAIK you have to have a blank line at the end of the xml/provxml file. This is the code for me to set up my data connection
Code:
<wap-provisioningdoc>
<characteristic type="CM_GPRSEntries">
<characteristic type="T-Mobile Internet">
<parm name="DestId" value="{F750E26F-81D9-4379-8567-318C129CA736}" />
<parm name="UserName" value="faster" />
<parm name="Password" value="web" />
<parm name="Enabled" value="1" />
<characteristic type="DevSpecificCellular">
<parm name="GPRSInfoValid" value="1" />
<parm name="GPRSInfoAccessPointName" value="general.t-mobile.uk" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

Install Builder 0.7

I recently read about the QuickCab software that allow creation of PPC cabinet, and the request for shortcut creation, as well as Vista compatibility problem. I would like to present another software that do the same work.
Install Builder is a free standalone application that allow novice user to create setup cabinet for Pocket PC and Smart Phone. Install Builder use a simple ini file to store project settings, you can use simple editor like notepad to edit the ini file.
The setup cabinet contain binary encoded and xml installation file plus all application files. It support two installation mode (ActiveSync --> PPC, PPC --> PPC). The setup cabinet can copy files, make shortcuts and add registry keys.​Requires the .Net Framework 2.0 too!
Warning : You can only place file in the following directories and it's subdirectories at this time : (that means, no absolute path supported)
{app}, {pf}, {win}, {startup}, {mydocu}, {group}, {fonts}, {startmenu}
This software is freeware and opensource.
http://www.quickzip.org/softwares-installbuilder
Gee that is serendipitous. I just posted a request for something like this at just about the same time you posted. Thanks a lot. Will give it a try. Sounds like just what I am after.
Iycj
I have been trying to use your tool. I can get it to make the CAB alright which is a big step in the right direction for me. Problem is when place the CAB on my HTC Diamond and install it comes up with a "cannot be installed - try different location" error. As I am a newb with this could you please take a look at the below Inno code to see what I have done wrong. BTW I am using DefaultDirName={pf}\debug to test it and I would also like to ask what the correct syntax is to replace {pf} with the root folder on my Diamond device.
Thnx and Regs
Logger
Code:
[Setup]
AppName=3DiamondShortcuts
Author=Logger
TargetPlatform=StrongArm
DefaultDirName={pf}\debug
Description=loggers mods for the Diamond
[Files]
Source: "C:\Users\Logger\Work\3Diamond Shortcuts\three.png"; DestDir: "\Application Data\Manila"; Flags: "NoOverwrite"
Source: "C:\Users\Logger\Work\3Diamond Shortcuts\Manila\InternetPortal.xml"; DestDir: "\Windows"; Flags: "NoOverwrite"
[Icons]
[Registry]
Greetings
Root folder must be specified so,
DestDir: "\Windows" ===> DestDir: "{win}"
As for \Application Data\ directory, because this entry wasnt here when I first develop the product (in 2006), I need the code for that folder. the current list of folders is as below : (http://www.cabextract.org.uk/wince_cab_format/#files have more info)
Code:
app = 0, // %InstallDir%
pf = 1, // \Program Files
win = 2, // \Windows
startup = 4, // \Windows\StartUp
mydocu = 5, // \My Documents
group = 11, // \Windows\StartMenu\Programs
fonts = 15, // \Windows\Fonts
startmenu = 17 // \Windows\StartMenu
And you can use the code directly, e.g. {app} is equal to {0}.
I have examined the code created by QuickCab, please try the following and see if it works.
Code:
[Setup]
AppName=3DiamondShortcuts
Author=Logger
TargetPlatform=StrongArm
DefaultDirName=\
Description=loggers mods for the Diamond
[Files]
Source: "C:\Users\Logger\Work\3Diamond Shortcuts\three.png"; DestDir: "{app}\Application Data\Manila"; Flags: "NoOverwrite"
Source: "C:\Users\Logger\Work\3Diamond Shortcuts\Manila\InternetPortal.xml"; DestDir: "{win}"; Flags: "NoOverwrite"
[Icons]
[Registry]
Regards
Joseph Leung
Joseph, Sorry for the slow reply. Had to work last night.
Tried your code. If I use "DefaultDirName=\" as per your suggestion, I get "Dirs.Offset dont match Writer's position!" and install builder does not create the cab.
So I changed ONLY "DefaultDirName={app}\" in your suggested inno and the build succeeds.
However installing the CAB on my diamond still fails with an unsuccessful message.
i do not know if the following gives any clues?
debug.txt =
Code:
----- Debugging -----
----- Dir Section -----
InstallDir = %CE0%
2 = {app}\Application Data\Manila
3 = {win}
----- File Section -----
three.png --> {app}\Application Data\Manila (NoOverwrite)
InternetPortal.xml --> {win} (NoOverwrite)
--- Registry Section ---
----- Link Section -----
----- End Debug -----
_setup.xml looks like this
Code:
<wap-provisioningdoc>
<characteristic type="Install">
<parm name="InstallPhase" value="Install" />
<parm name="OSVersionMin" value="0.0" />
<parm name="OSVersionMax" value="0.0" />
<parm name="BuildNumberMin" value="0" />
<parm name="BuildNumberMax" value="0" />
<parm name="AppName" value="Logger 3DiamondShortcuts" />
<parm name="InstallDir" value="%CE0%" translation="install" />
<parm name="NumDirs" value="2" />
<parm name="NumFiles" value="2" />
<parm name="NumRegKeys" value="0" />
<parm name="NumRegVals" value="0" />
<parm name="NumShortcuts" value="0" />
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%InstallDir%\Application Data\Manila" translation="install">
<characteristic type="MakeDir" />
<characteristic type="three.png" translation="install">
<characteristic type="Extract">
<parm name="Source" value="0three~1.001" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="%CE2%" translation="install">
<characteristic type="MakeDir" />
<characteristic type="InternetPortal.xml" translation="install">
<characteristic type="Extract">
<parm name="Source" value="Intern~1.002" />
</characteristic>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry" />
</wap-provisioningdoc>
Thanks for your patience here.
Logger
Greetings
I checked the code, it cannot handle absolute path at this time, I do not have a fix right now, I will fix the problem once I have the time, until then, please use relative path only.
Regards
Joseph Leung
OK thanks. Still confused. Could you PLS give me a very simple example of relative path syntax that will actually work.
Does this mean:
DefaultDirName=\{app}
DestDir: "\{app}\Application Data\Manila"
DefaultDirName={app}
DestDir: "{app}\Application Data\Manila"
or something else? Either of these will create a cab for me but neither will install. Perhaps I had best wait until you get around to fixing it so it can do absolute cos I am confused by the syntax.
Thnx.
Greetings
You can use
DefaultDirName={pf}\Manila
DestDir: "{app}\Application Data"
{app} is actually DefaultDirName defined above.
Regards
Joseph Leung
Good deal, thanks. I'll give it a try.
What language is this written in?
lycj said:
Greetings
You can use
DefaultDirName={pf}\Manila
DestDir: "{app}\Application Data"
{app} is actually DefaultDirName defined above.
Regards
Joseph Leung
Click to expand...
Click to collapse
Thanks, that works on my Diamond. Although it places the files in
\Program Files\Manila\Application Data\.
Just tried
DefaultDirName={win}
DestDir: "{app}\Manila"
and that places the files in \Windows\Manila
So thanks, I can get your program to work. But it is not a lot of use to me until I can specify the root directory as DefaultDirNam. Otherwise it is not possible to install files to more than 1 upper level directory.
This is because DestDir has to be relative to DefaultDirNam. As it is I cannot tell it to install files in two upper level folders because you have to specify a single location in DefaultDirNam and it will not allow you to specify the root.
For example I want files to go into both
\Application Data\ Manila
\Windows
so I would need to specify something that would give
DefaultDirName={root}
DestDir: "{app}\Application Data\ Manila"
DestDir: "{app}\Windows"
If I was to specify {win} as DefaultDirNam I can send some files there, but in doing so I preclude the possibility of sending files to \Application Data\ Manila because \Application Data is not a child folder of \Windows.
Also as an aside I have found I can successfully send files to {pf},{win} but not {app}. If I set {app} in DefaultDirNam install fails for some reason.
Anyway thanks for the app. Just need to be able to speficy the root in DefaultDirNam and all would be good.
Cheers.
I found a bug
Hi!
This is really a usrful app to me. thx.
Today I have tried to create a cab and to install it, but the installation failled.
I was looking for the reason the whole day and finally I found it.
I have a german special character in my name: ü
after changing the value of the Author tag, it worked fine.
regards,
misch

solved - adding favs to provxml in operatorpkg

Hi. I've spent all evening trying to cook in my favorites, by editing the stock favorites in \OEM\LEO\0409\OperatorPkg xipupdate_oemoperators_100.provxml but when i build the rom, the favorites are blank.
If i copy in the stock .provxml again and re cook, theyre all back, but change one letter and favs is blank again (though i suspect it will turn out to be something to do with saving, rather than the editing itself.)
I've been making sure to re apply 'read only', and ive tried various unicode, utf-8 and what have you using notepad and notepad++,
What am I missing?
Thanks.
You probably need to have it as system file and hidden as well. Make sure you apply attribute fix to your kitchen.
ai6908 said:
You probably need to have it as system file and hidden as well. Make sure you apply attribute fix to your kitchen.
Click to expand...
Click to collapse
hmmm, i'm mostly sure the attribs are correct, i set the folder to show attrib column, so i could compare with the other files in the set of three,,,,
RHS if i remember correctly. i'll certainly look deeper into attributes when i get home though, so thanks for the pointer.
In a TMOUS rom, save the following to "mxipupdate_oemoperators_106.provxml" and put it somewhere inside your Opera's EXT file firectory. Cook it in and your set, once you set your info. And make sure each entry is 4-lines long, if you don't format provxml right, it will kick the whole thing out. And to my knowledge, the attribute really doesnt effect it, as long as it's formated correctly.
<wap-provisioningdoc>
<!--328.01_pIE My Favorites Smartphone-->
<characteristic type="BrowserFavorite">
<characteristic type="web2go">
<parm name="URL" value="http://m.web2go.com" />
<parm name="Order" value="2" />
</characteristic>
<characteristic type="ESPN">
<parm name="URL" value="http://proxy.espn.go.com/wireless/espn/html/pocketpc" />
<parm name="Order" value="4" />
</characteristic>
<characteristic type="CNN">
<parm name="URL" value="http://www.cnn.com/" />
<parm name="Order" value="5" />
</characteristic>
<characteristic type="My Account">
<parm name="URL" value="http://myaccount.wap.t-mobile.com" />
<parm name="Order" value="6" />
</characteristic>
<characteristic type="Download Ringtones">
<parm name="URL" value="http://ringtones.store.t-mobile.com/" />
<parm name="Order" value="7" />
</characteristic>
<characteristic type="Browse Wallpaper">
<parm name="URL" value="http://wallpaper.t-mobile.com/" />
<parm name="Order" value="8" />
</characteristic>
<characteristic type="Browse CallerTunes®">
<parm name="URL" value="http://pda.callertunes.com" />
<parm name="Order" value="9" />
</characteristic>
<characteristic type="My Album">
<parm name="URL" value="http://myalbum.t-mobile.com" />
<parm name="Order" value="10" />
</characteristic>
<characteristic type="Help">
<parm name="URL" value="http://help.wap.t-mobile.com" />
<parm name="Order" value="11" />
</characteristic>
<characteristic type="Gogo® Inflight Internet">
<parm name="URL" value="http://www.gogoinflight.com/htchd2" />
<parm name="Order" value="13" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
Click to expand...
Click to collapse
ok, i'll give that a try, butwon't they all be duplicated since they already exist in _100.provxml?
When I decompile a rom, the first thing I do is remove the attributes from the OEM's provxml's and remove that from the original provxml file. I use opera 10 currently so I don't use this one, but that's what I used to do. Any problems, attach your provxml and I can help ya corectly remove them so there are no dupes.
OKayyy, so my first lesson in chefing.
I renamed the provxml to just xml, opened it in firefox, and hey presto, instant answer.
It doesnt like the xda advanced google search URL
<parm name="URL" value="http://www.google.com/advanced_search?q=+site:http://forum.xda-developers.com&hl=en&lr=&as_qdr=all" />
It fails after developers.com, and so no favs at all, (i assume cos the whole file fails)
Removed &hl=en&lr=&as_qdr=all and hey presto, fixed, nothign to do with attribs and what not at all.
<blush>
My lesson for the day, 'browsers will tell me where the error is in provxml files'
I can go to sleep now. Thanks for the pointers, even if I was throwing you a red herring.
The & symbol and several others require special formatting in xml. You would replace it with "&". Actually, just delete the provxml entries and do a straight up registry export and insert it in your app.reg file. Way easier btw...
rstoyguy said:
The & symbol and several others require special formatting in xml. You would replace it with "&". Actually, just delete the provxml entries and do a straight up registry export and insert it in your app.reg file. Way easier btw...
Click to expand...
Click to collapse
ah of course , , think html, got it.
"export from registry"
so they are registry entries as well as files in windows\favorites?
just scanned it, couldn't find any reference to them.
samsamuel said:
I renamed the provxml to just xml, opened it in firefox, and hey presto, instant answer.
Click to expand...
Click to collapse
Thats XML lesson 101 LOL.

Resources