Installed application list

derez

Expert
Licensed User
Longtime User
Hi !
Does anybody know where does WM keeps the list of installed applications ? (the list that you see when you select "remove programs" ).

I looked at the registry HKLM-Software-apps and there is a very similar list but it is longer than the list in remove programs, so I guess there is some other file or database or another place in the registry.

I want to try to imitate what the cab does and put the installed application in the list with all the appropriate inputs.

I searched the net and found many tweaks but not what i'm looking for.
Windows Mobile 5 Registry Tweaks - MoDaCo
 

derez

Expert
Licensed User
Longtime User
Yes, thank you, but i'm not satisfied...

The first link is looking at the registry software\apps , which I find not exactly like the list of applications which are possible for removal.
I tried to add keys and values for a dummy program in the same format as other programs there, but it does not appear in the list even after soft reset.
So I deduct that the list is kept somewhere else.

Edit:
I looked and found another list in the registry, which seems more like the one in the remove programs, it is in Security\appInstall, so I'll try to work there. Thank you for the trigger.
 
Last edited:

derez

Expert
Licensed User
Longtime User
This is what I found:
1. in the device, windows\appmgr there is a list of all the installed applications, each as a directory. Inside there is usually a .tmp file which is launched when you request to remove the application, using the dedicated function in the settings.

2. The same list is in the registry at HKLM\Security\appInstall.

3. The tmp files are locked so you cannot copy them, but I did it from an emulator. It opened in notepad and looks like XML format, but cannot be opened by LoadXML to a table.

does anybody know of a tool to edit this file, so it will be prepared for installation of a new application ?
 

Attachments

  • 8C00.zip
    523 bytes · Views: 193
Last edited:

derez

Expert
Licensed User
Longtime User
Ariel_Z : - the attached file is the one that does not open. I said that I copied it from an emulator, the files in the real device are locked.

Agraham: I see the file using notepad, like this:


In the meantime I created registry keys in Security\AppInstall and the application appears in the "Removal of Programs" list. This means that I can emulate the function of puting the installed application data there - only if I can create an uninstall file. Of course I can replace the specific application's details in this file with those of the new application but it will be nicer to have a tool to edit it - with your (or anybody else) help, since I don't have a clue about XML. Thanks.
 

Ariel_Z

Active Member
Licensed User
B4X:
<wap-provisioningdoc>
   <characteristic type="Install">
        <parm name="InstallPhase" value="uninstall"/>
         <parm name="SetupPath" value=""/>
         <parm name="AppName" value="Caywen Kevtris"/>
         <parm name="InstallDir" value="\Program Files\Games"   translation="install"/>
         <parm name="NumDirs" value="2"/>
         <parm name="NumFiles" value="1"/>
         <parm name="NumRegKeys" value="0"/>
         <parm name="NumRegVals" value="0"/>
         <parm name="NumShortcuts" value="1"/>
      </characteristic>
<characteristic type="Registry" cfgnodetype="characteristic"/>
      <internal-transaction type="Install"/>
      <internal-transaction type="FileOperation"/>
      <characteristic type="FileOperation">
         <characteristic type="\Windows\Start Menu\Programs\Games\Kevtris!.lnk" translation="install">
            <characteristic type="Delete"/>
         </characteristic>
         <characteristic type="\Program Files\Games\Kevtris.exe" translation="install">
            <characteristic type="Delete"/>
         </characteristic>
         <characteristic type="\Program Files" translation="install">
            <characteristic type="Games" translation="install">
            <characteristic type="RemoveDir"/>
         </characteristic>
      </characteristic>
   </characteristic>
</wap-provisioningdoc>

Derez: This is the XML, parsed so you can read it. I didn't know you had no clue about XML. In this case, here are the facts you need:
1. XML is human readable.
2. XML TAGS are the name of the properties/parameters of properties. They are enclosed inside <.... /> sings. Note the / that indicates end of tag.
3. If a tag contains nested tags, it taks the form <tag> ... nested ... </tag>.

So let's parse together the first couple of lines:
<wap-provisioningdoc> - open property wap-provisioning-doc[ument?]
<characteristic type="Install"> - this property has sub-property named charachterisitic which in turn has a property with the name type and value "install". It does not end - it has nested properties, defiend as parameters (param)
<parm name="InstallPhase" value="uninstall"/> - sub parameter of the characteristic, parameter name is "intallPhase", value is "uninstall". This parameter has nothing nested in it - it ends with /.

Is it clearer now?
 

derez

Expert
Licensed User
Longtime User
Thank you Ariel_Z, this looks better now, and I even feel that I can understand some of it, so this means that I am Human :sign0060:

I tried to create a similar file, replacing the relevant strings which define the name of the application, path etc. , with those relevant to a new installed application.

I created the registry entries like those of the sample application - but the remove program does not work on it. (the only removal it does is deleting the name of the application from the list and removing the entries to the registry.

I suspect that the format of the uninstall file is incorrect. I saw that if I use basic4ppc "readfiletoend" and save it to a new file I get the text with blanks after every charachter !!.

To overcome it - I removed the blanks and then saved it (after names replacements) with blanks and also without blanks - both ways it was not accepted by the remove programs.

Agraham wrote that the encoding is "UTF16 instead of the more normal UTF8 " - does it matter to the uninstall program ?

I attach two examles of such files.

It might be that the execution fails because it does not find the exe file which is defined by:
<characteristic type="\Program Files\Games\Kevtris.exe" translation="install">
<characteristic type="Delete"/>
I want my program to delete the whole directory so I dont need this command for the specific file. Can you update the file to be valid without it ?
similarly for the link - I want to delete either the link directory or the link to the program - how to write it ?

Thanks for your help
 
Last edited:

agraham

Expert
Licensed User
Longtime User
if I use basic4ppc "readfiletoend" and save it to a new file I get the text with blanks after every character !!.
That's because the characters in the file are UTF16 (usually two byte) characters and you have read the file assuming UTF8 (usually one byte) characters which is what the Basic4ppc file handling assumes.

You could use BinaryFile to read the file but it would probably be easier to use CodePageFile from my ByesConverter libary that can read and write files with a specified encoding. Use codepage 1200 when you open the file and hopefully it will work just like a normal file.
 

derez

Expert
Licensed User
Longtime User
Let me see if I can manage it, please check:

I'm not sure about the last </characteristic> - how many should be there...
 
Last edited:

derez

Expert
Licensed User
Longtime User
Thanks Andrew - I shall try it.

Edit: It works ! But how do I convert it back to the same encoding as the original ? which codepage do I need to put in the Fileopen ?
 
Last edited:

agraham

Expert
Licensed User
Longtime User
which codepage do I need to put in the Fileopen ?
For writing? The same as for reading, 1200, then just write the information. I note that the original file didn't seem to have any CRLFs. I don't know if that will be important or not when you rewrite the file.
 

derez

Expert
Licensed User
Longtime User
Well, I can't make it accept the modified file.
I'll create my own uninstall process.

Thanks for the support

Edit: see version 5 of the setup program in "share your creation"
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…