Log in

View Full Version : Relocating (part of) Spb Pocket Plus 3.0 to the File Store


Menneisyys
07-20-2005, 12:17 PM
Much as the memory handling of the new Spb Pocket Plus (SPP) is indeed much better than the previous version (read: it no longer installs anything completely unnecessary into \Program Files in the RAM), there is still something you can do in order to clean up some additional memory. If you follow this tutorial, you can free up 687+27+1495=2209 kbytes of RAM, which can be quite important for people with devices that have limited RAM memory (pre-WM5 64 Mbyte RAM-equipped devices, not to talk about 32 Mbyte low-end ones like the iPAQ rz1715).

First, install the application into the File Store and not on any storage card or the main memory. This will only copy some 1.162 Mbytes of program .DLL and .EXE files (counting in also the Control Panel Applet, PocketPlus.cpl), a 27k HTML Windows help file (PocketPlus.htm) and five .TSK files totalling 1495 kbytes into the RAM. The rest will go to the File Store.

Now, move the .tsk files to your storage card (or, if you have enough free space there, your File Store). If you have the ignore_my_docs (http://www.pocketpcthoughts.com/forums/viewtopic.php?t=2863) file (this file will be automatically (re)created if you don’t have a \My Documents directory on your card/File Store) in the root directory on your storage card (or, File Store), just dump the tsk files in the root.

If you have a \My Documents directory on the card (or, the File Store), just move the tsk files there. Please note that you can’t put the files in any subdirectories (not even subdirectories under \My Documents) if you want them to be recognized by the Settings/Today applet.

Now comes the more interesting part: relocating some of the DLL’s. If you’ve read my article on relocating the previous, 2.5 SPP version (http://www.firstloox.org//forums/showthread.php?t=3752), you may have already guessed which DLL’s you can relocate: \Windows\plusactions.dll and \Windows\PlusService.dll. In addition, you will be able to relocate the 44k SafeMode.exe.

You’ll first need to create a directory to store your DLL files in in the File Store. You’ll need to include this directory in the so-called System Path.

I’ve described extending the System Path in my article on relocating CalliGrapher from the main memory (http://discussion.brighthand.com/showthread.php?s=&postid=773927), but, in order not to have to read another article, I also summarize the steps to be taken in here.

If you don’t want to use the already-written tools to create the shared DLL directory and extend the System Path, do the following. (Please note that there’re several tools that help making this much easier: MemMaid (http://www.pocketgear.com/software_detail.asp?id=14279), Tweaks2k2 (http://www.tweaks2k2.com) or Mad Programmer’s System Path utility (http://www.geocities.co.jp/SiliconValley-Cupertino/2039/). I’ve described the usage of MemMaid in my CalliGrapher article (http://discussion.brighthand.com/showthread.php?s=&postid=773927) and using the Mad Programmer tool in my article on relocating SPP 2.5 from the main memory (http://www.firstloox.org//forums/showthread.php?t=3752). Tweaks2k2 works similar to these.)

1, create a DLL directory in your File Store you’re going to include in the System Path. Let’s call it, say, dlls.
2, get a registry editor. To be able to edit the System Path, get either Resco Registry Editor (http://www.resco.net/pocketpc/explorer/), Kilmist Registry Editor (http://www.kilmist.com/ppcRegistryEditor.htm) or Tascal Registry Editor (http://www2r.biglobe.ne.jp/~tascal/download/pocketpc/tre_e.htm) (and not the PHM Registry Editor or the editor in Total Commander 2.0. Please read my post on registry editors’ REG_MULTI_SZ editing capabilities (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=16508) (posted at 07/20/2005) for the why’s).
3, start the registry editor and go to [HKEY_LOCAL_MACHINE\Loader\SystemPath]:

http://winmobiletech.com/072005SpbPP30/Spb30Relocate-1.gif

4, edit it. If it’s the first time you edit it, it may be empty. If it isn’t, append the new directory name in a new row. In the next screenshot, I only have one shared DLL directory, dlls, in the File Store. The latter is called LOOXstore on Pocket Loox devices, iPAQ File Store on HP iPAQ’s etc. Please make sure you insert the trailing backslash (\) after the path!

http://winmobiletech.com/072005SpbPP30/Spb30Relocate-2.gif

Note that this value will be different on your PDA. Again, if you’re unsure, you may want to resort to MemMaid/Tweaks2k2/Mad Programmer’s System Path to do the ‘dirty work’ for you.

Now, your System Path is modified. The next step will be deregistering the service so that its DLL’s are released and may me accessed/moved.

1. start the registry editor and go to HKEY_LOCAL_MACHINE\Services\PocketPlus:

http://winmobiletech.com/072005SpbPP30/Spb30Relocate-3.gif

2. click Dll on the lower pane and modify the String value so that the system no longer finds the DLL on the next reboot; that is, it won’t be able to lock them either. For example, insert a leading A letter at the beginning of the name as shown on the following screenshot (again, it can be anything else):

http://winmobiletech.com/072005SpbPP30/Spb30Relocate-4.gif

3. press OK and then save. Now, reset your device.
4. after booting in, just move the two above-mentioned DLL’s from \Windows to your shared DLL directory. Use for example Total Commander with the WinCE FS plug-in (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=15577) for this.


http://winmobiletech.com/072005SpbPP30/MoveTheTwoDLLs.gif

(Please note that this screenshot has been made for version 2.5 of SPP; this is why the file sizes are a bit different.)

5. start your registry editor; go back to HKEY_LOCAL_MACHINE\Services\PocketPlus and change the Dll value back to PlusService.dll (in this case, I’ve just removed the leading A from before it). Reboot your device again.

And yes, it’s running! :)

You can also relocate the 227k \Windows\PocketPlus.cpl Control Panel applet to the shared DLL directory. Then, you will no longer have the Spb Pocket Plus icon on your Settings/System screen. This is hardly a problem because you will have exactly the same setting screen if you just click the Spb Pocket Plus icon on the Today screen or go to the SPP/Options menu in the PIE plug-in.

Also, to save up another 44 kbytes, you may want to relocate \Windows\SafeMode.exe to anywhere else in the File Store (not necessarily in the shared DLL directory). Just move it to the target directory and go to [HKEY_LOCAL_MACHINE\init] , the key group that lists the (even system) services to be loaded during booting.

In here, search a string value of “SafeMode.exe”. It’ll be just the one before shell32.exe (on this screenshot, the 49th):

http://winmobiletech.com/072005SpbPP30/HKLMInit.gif

Edit it to include the full path to the new location of SafeMode.exe:

http://winmobiletech.com/072005SpbPP30/Spb30Relocate-5.gif

Save this new value. Upon the next boot, SafeMode will be executed from the File Store.

(Incidentally, if you do this, upon uninstalling SPP, it won’t delete its entry from HKEY_LOCAL_MACHINE\init. You’ll need to do it yourself.)

Congratulations! You’ve freed up 2209 kbytes of RAM (one-eighth of the clean-start free RAM of an iPAQ rz1715), without crippling SPP or making the new task files unaccessible :D !

ipaq_wannabe
07-20-2005, 02:04 PM
perfect!!!

PocketPC Addict
07-20-2005, 08:13 PM
Cool! Thanks for the tip. 8)

Menneisyys
07-24-2005, 04:41 PM
I’ve just retested relocating SPP 3.0 on a WM2003 iPAQ 2210; the Spb*.tsk files SPP installs on these devices are a lot smaller (their cumulative size is 269k) than the ones installed on VGA devices. That is, don’t be afraid if you see much smaller TSK files on your PDA’s than the ones I’ve mentioned in my original article.