Log in

View Full Version : Relocating applications on the Pocket PC - a tutorial


Menneisyys
04-25-2005, 05:28 PM
Relocating applications on the Pocket PC - a tutorial

I'm continuously running into questions regarding relocating programs into a storage medium (for example, a memory card) because of the lack of the main memory. This made me write the following tutorial.

However, before you decide for moving (relocating) a specific application (or, some of them) to a storage medium, you may want to read the following threads, in which the hows, whens and whys of relocating applications from the main memory to any storage medium:

http://www.pocketpcthoughts.com/forums/viewtopic.php?t=36674 : a thread explaining what can be relocated

http://www.pocketpcthoughts.com/forums/viewtopic.php?t=36376 : a thread explaining the problems of storing a lot of files in the main memory and also shows the effects of relocating Web browser caches to a storage medium.

Now, back on the subject:

Relocating an application depends on whether you have access to the same PC that you've set up your PPC programs from. If you have, and haven't reinstalled your desktop Windows after installing your programs on your PDA (this guarantees that the installation CAB files are still known and accessible to ActiveSync; see my explanation at, for example, http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=14246 on this), you have a great chance the ActiveSync-based transition process will be simple.

Please note that this won't work in the following cases, even if you have always used the same ActiveSync all the time with all the other apps:

- the application came only as a CAB file (and not as a Windows installer), which, consequently, you have run on the PDA itself to be installed and not on the desktop computer. There're a lot of examples for this; for example, Pocket UFO Beta (see for example http://www.pocketpcmag.com/forum/topic.asp?TOPIC_ID=15194 on it.)

- the application came as an EXE file that must be run on the PDA and not on the desktop computer. An example of this is the widely-known SE_VGA application ( http://www.pocketgear.com/software_detail.asp?id=14679 ) . (Incidentally, SE_VGA is unique in that respect that it comes as an installer EXE that must be executed on the PDA. I haven't seen any other PPC apps that have used PPC-based installers as yet.) The same stands for, for example, ozVGA ( http://207.153.195.134/ ), which consists of an EXE file that must be extracted from its compressed distribution package and copied to the PPC by hand. And, a lot of small, typically, smaller than 50-100 kbytes, utilities come without any kind of CAB file or desktop installer; for example, easySMS ( http://www.siedler-net.de/WinCE/easySMS/ ) or Peter O'Neill's SMS application ( http://poneill.ucd.ie/SMS/ ; incidentally, see my roundup on mobile phone handler apps at http://www.pdamania.hu/content/1840 - beware, it's in Hungarian! - on the two latter applications.)

- much as the installer was run on the desktop, it didn't use ActiveSync for installing its files. One of the most known examples of this category is Destinator ( http://www.destinator1.com/ ) or Pocket Presence's applications (see below, the "advanced" section, on "hacking" them into a storage card). In this case, it won't be listed in the ActiveSync list at all; not even as a non-editable list item, unlike the case with CAB files that have been installed on the PDA or applications that have been installed from another Windows computer. Applications like these (that is, apps that completely circumvent the traditional ActiveSync installer) must be reinstalled by executing the desktop-based installer, if they allow for installation on a storage card at all. For example, Pocket Presence applications don't support the installation on any kind of storage card, which is a real pain in the back because they take a lot of memory. (No wonder I resorted to hacking them into a storage card - also see the "advanced" section on the details of this!)

In other cases, however, you don't need to uninstall and reinstall your apps by either going to Settings/System/Remove Programs on your PDA or, if it has a desktop installer, restarting the installer application on the desktop, which most probably will start in Uninstall mode.

So, do the following:

Cradle your PPC and activate the ActiveSync window. Go to Tools / Add/Remove Programs. You'll see something like this:

http://menneisyys.freeweb.hu/installremoveapps/RelocationWithAS-1.gif

(Please note that, initially, the checkbox in front of Install program into the default installation folder is checked. I've already unchecked this before taking this shot. Do the same - you'll need this option disabled later.)

Here, there're three kinds of checkboxes:
- the grayed-out (that is, not clickable) checkboxes show programs that are installed on your PDA, but are no longer existing on the local desktop device and/or were installed right on the PDA with, for example, CabInstl or other means of CAB installation (see Gerard's excellent article on this subject at http://www.vancouverpocketpc.com/CAB_installation_tweak.html ). On the picture above, three of the visible applications are like this.

- checkboxes that are checked are installed from the desktop PC and their installation CAB files are still accessible to ActiveSync. An example of these kinds of apps on the image above is Conduits Pocket Artist.

- checkboxes that are unchecked have already been deleted from the Pocket PC (by using its Remove Programs applet); their installation CAB files are still accessible. An example of this is ACCESS NetFront 3.2 in the example picture.

All you have to do is uncheck the checkbox of the application that you want to relocate and press the OK button. For example, if you choose to relocate Conduits Pocket Artist from the above list, you only need to uncheck its checkbox as is in the following picture:

http://menneisyys.freeweb.hu/installremoveapps/RelocationWithAS-2.gif

Then, just press OK.

After AS returns to the usual initial screen, go to Tools / Add/Remove Programs again. In the list, Conduits Pocket Artist will be unchecked. Now, check it, and press OK again. You'll be presented the usual target chooser screen:

http://menneisyys.freeweb.hu/installremoveapps/RelocationWithAS-3.gif

From it, just choose the target (for example, SD Card, Storage Card etc.). The application will be reinstalled at the new destination.

That's all, as far as the easiest way is concerned.

Now comes the harder stuff/stuff meant for people more interested in the secrets of how Pocket PC's work. This section is definitely NOT for beginners!

If you don't have access to the same desktop (or, to ANY desktop computer - happens often "in the field", in a foreign country etc.) and you don't have the initial EXE files you've installed your apps from (and you can't download them again), you can even try relocating your existing apps by hand. It involves a lot of manual hacking sometimes, so, in general, it's highly questionable if you really want to do want to do this kind of relocation by hand.

First, you'll need to update the link files in \Windows\Start Menu[\Programs] to point to the new location. This is the easiest part.

Second, if the app doesn't run after this, you need to scrutinize its registry entries to see if it has some hard-coded paths (mostly resources, DLL's and stuff like that). You will want to follow the DLL+Registry hacking thread links I've collected at http://www.pocketpcthoughts.com/forums/viewtopic.php?t=36584 and http://www.pocketpcthoughts.com/forums/viewtopic.php?t=36622 for more info.

Third, if the app doesn't run even after this (because it's not in the Registry that wired-in path info is but somewhere else - in the files themselves), you need to scrutinize all files to see which must be left in the main memory. This sometimes equals to leaving one file or directory in main memory at a time and starting the application; therefore, can be very tedious. However, in some cases, it helps in relocating apps to a storage card that otherwise could only be installed into main memory. An example of this is Pocket Presence's applications, as has already been stated. By a lot of hacking, I've managed to relocate them almost entirely to storage card. See for example my remarks on this at http://www.pocketpcthoughts.com/forums/viewtopic.php?t=36674&postdays=0&postorder=asc&start=30