Skip to main content

Past Blast

Featured Products

Windows Mobile Developer Controls
Windows Mobile Developer Controls
Stay in touch using the DEVBUSS RSS feeds.
 

News

Windows Mobile Developer Controls
Windows Mobile Developer Controls

VBRegFix - The free answer to your eVB uninstall woes

Written by Ralph Brown  [author's bio]  [read 51349 times]
Edited by Derek

Page 1  Page 2  Page 3 

Necessity is the mother of invention

It all started when I had a shareware program rejected by a download site because the reviewer's PocketPC couldn't start an embedded Visual Basic (eVB) component. Of course this was completely irreproducible at first, which ticked me off, and after a lot of messing around, I happened to stumble on the cause. When an eVB program is uninstalled, ActiveSync removes everything installed with it, usually including the eVB runtime system! From the standpoint of all other eVB programs on the PPC, that's all she wrote, or rather erased: they can't run.

What probably happened to the reviewer was that he had been reviewing an eVB program, and then uninstalled it before trying my program. My program couldn't start because no eVB program would work at that point on that machine.

Installing eVB applications

The genesis of this is that when an eVB developer wants to set up an installation package for a program, normally (s)he would use the Application Install Wizard. The wizard is part of the eVB development system, and is all very simple, but one of the defaults, sitting in a very innocent looking little check box, is "Include Device Runtime". The purpose of this option is to include the EXE and DLL files that allow eVB to run as part of the installation package. Now, this is a little weird since these files are already in ROM and the copies waste memory, so it's not at all obvious why this is done. We can cut Microsoft a little slack by telling ourselves that this practice ensures that the latest versions of the code are loaded, and if you say it fast, it does make some sense.

When an eager user then installs such an eVB program, two things happen: the eVB application and all the runtime EXEs and DLLs are loaded, and equally importantly, the runtime DLLs are registered in the PocketPC's registry. The registry holds the key to all this. Among a lot of other stuff, the registry has an entry that tells WinCE what to do when it encounters an eVB program, that is, a file with a .vb extension. It is told by the registry entry that the polite thing to do is to run PVBLOAD.EXE and give it the .vb file to deal with. This is how eVB programs get run.

The wheels fall off

All is just hunky dory up to this point, but now comes the nasty part. When our trusting user uninstalls the eVB program, ActiveSync tries to reverse everything that happened when it was installed. All the application files are removed, any runtime files loaded with it are removed, and all changes to the registry are undone. If you say this very fast, and also mumble a bit, it sounds kind of OK.

It's not. The machine is now in deep doo doo.

Next Page