VBRegFix is a Freeware program that helps to keep embedded Visual Basic (eVB) programs on PocketPCa€™s running after another eVB program is uninstalled. This is a known and widespread problem with eVB programs created for PocketPC.
You can tell you have this problem if you try to run an eVB program named a€oFooa€ for example, and get a message:
There is no application associated with a€oFooa€Â. Run the application first, then open this file from within the application.
For some cases, you can just run VBRegFix and it will fix the problem. However, you may then get a message similar to:
The control MenuBar1 ({00AB0E66-7888-4321-A443-E3FB7843A789}) could not be created.
Unfortunately, ita€™s too late, you have to reinstall the eVB application that doesna€™t work. Next time, be sure to run VBRegFix every time after you install applications and you shouldna€™t ever see either message.
VBRegFix Installation
1. Make sure your PocketPC is attached and synched to your desktop computer.
2. Run Setup.exe. That will start your ActiveSynch Application Manager which will load the files into your PocketPC.
This will install the following files
* \Program Files\NCA\ VBRegFix \ VBRegFix.exe – this is the executable file, don’t delete this
* \Windows\Start Menu\ VBRegFix – this is a shortcut to the executable which appears in the Start list, can be deleted
* \Windows\Start Menu\Programs\ VBRegFix – this is a shortcut to the executable which appears in the Programs window, can be deleted
You can now run VBRegFix by clicking on the icon. You should to run it whenever you install or uninstall an eVB program. Running it too often has no effect, it won’t hurt anything. When you run VBRegFix, you may get a message offering to delete some DLLs to save memory space. This happens whenever there are DLLs left over from an uninstalled application that weren’t also installed by any other application currently installed on the machine. If you press the OK Delete button, those DLLs will be deleted, freeing up the RAM space. If you press Cancel they won’t, which doesn’t hurt except that they take some of your memory. If there aren’t any unused DLLs you’ll get a message saying so. In all cases, any DLLs left on the machine will be automatically reregistered.
NOTA BENE: For VBRegFix to work, it must be run every time after you install applications.
VBRegFix Uninstall
1. Make sure your PocketPC is attached and synched to your desktop computer.
2. If VBRegFix is running, exit it (by tapping anywhere on it).
3. Open the ActiveSynch application and under Tools, select Add/Remove Programs. This will bring up a list of installed programs.
4. Select VBRegFix and click the Remove button. This will not affect the registration of any DLL’s.
What VBRegFix Does (brief explanation)
VBRegFix allows embedded Visual Basic (eVB) programs on PocketPC’s to run after another eVB program is uninstalled and all other eVB programs stop working. You can tell you have this problem if you try to run an eVB program named “Foo” for example, and get a message:
There is no application associated with “Foo”. Run the application first, then open this file from within the application.
For some cases, you can just run VBRegFix and it will fix the problem. However, you may then get a message similar to:
The control MenuBar1 ({00AB0E66-7888-4321-A443-E3FB7843A789}) could not be created.
Unfortunately, it’s too late, you have to reinstall the eVB application that doesn’t work. Next time, be sure to run VBRegFix every time after you install applications and you shouldn’t ever see either message.
Using VBRegFix After Installing and Uninstalling Applications
To avoid being unable to run eVB applications after uninstalling one, you should run VBRegFix every time after you install eVB applications. That’s really all that is necessary.
However, to remove any DLLs that are no longer needed by the remaining eVB applications, you can run VBRegFix after you uninstall programs. That will give you a list of DLLs that aren’t used by any installed programs and how much memory you can save by deleting them. If you want to save the memory, press the OK Delete button, if you don’t care about the memory, press Cancel.
License
VBRegFix is Freeware, that is, it can be freely distributed and copied by anyone for commercial and non-commercial purposes as long as they don’t make any changes to it.
Liability Disclaimer
While best efforts have been made to make VBRegFix as bug free as possible, Newburyport Computer Associates, Inc. and the author cannot guaranteed the correct running of it in all circumstances and cannot be held responsible for any damage caused by it’s use. If you don’t agree with this, please do not use VBRegFix.
What VBRegFix Does (long explanation)
When eVB programs are created with an installation program using the default settings in the Microsoft eVB development package, they include all the eVB runtime DLLs and the DLLs for any controls they use such as the tree control. When such a program is installed, it copies over the DLL’s, replacing the ones in ROM, adding the control DLLs which are not in ROM, and registers them all in the PocketPC registry. This is OK so far. The problem comes when you have more than one eVB program installed and you uninstall one which was created as described above. When such a program is uninstalled, it removes the DLL’s and unregisters them as part of the normal uninstall.
Now you cannot run any of the other installed eVB programs on your PocketPC. The reason for this is that the only way WinCE knows how to run an eVB program is by looking at the registry entries that were just removed by the uninstall. You still have all the DLL’s in ROM, you still have all your installed eVB programs, but they won’t run because WinCE doesn’t know what to do with them. In the case of the control DLLs it’s even worse, not only are they unregistered, they are deleted and there isn’t a ROM version, so they are completely gone.
There is nothing eVB program authors can do about this, their programs never even start. VBRegFix is a C++ program so it can run even if the eVB DLL’s are unregistered.
The way VBRegFix goes about avoiding all this is by changing what the built in uninstaller thinks has been installed. When an application is uninstalled, the uninstaller knows what to delete by reading a hidden unload file created for that application when it was installed. If you run VBRegFix after installing an eVB programs, it reads all the unload files, edits them to remove all references to the eVB DLLs and writes them back. Now, when the uninstaller runs, it doesn't find any references to the eVB DLLs, so it doesn't delete them, and all other applications that use them can keep running.
As my wife pointed out, a problem with just the above is that there isn't any way to get rid of the DLLs which really aren't used by any of the installed applications. This can eat up to 2MB of RAM. To get around this, VBRegFix makes a backup copy of the original unload files before editing them, essentially creating a list of what DLLs are used by what programs. When an application is uninstalled, its unload file is deleted, and if VBRegFix V2 doesn't find that unload file, it deletes the corresponding backup unload file, so there are only backups of unload files for applications that are still installed. To do the cleanup, VBRegFix scans all the unload backups, building a list of all referenced DLLs, those used by any of the installed applications. Any eVB DLLs not found in at least one of the backup copies will be deleted
since no installed application is using it.
The DLLs VBRegFix works with are:
vbscript.dll (ROM file)
pvbhost2.dll (ROM file)
pvbform2.dll (ROM file)
fileosp.dll
finance.dll
MSCEComDlg.dll
MSCEComm.dll
MSCEFile.dll
MSCEGrid.dll
MSCEImage.dll
MSCEImageList.dll
MSCEListView.dll
MSCEMenuBar.dll
MSCEPicture.dll
MSCETabStrip.dll
MSCETreeView.dll
MSCEWinSock.dll
I hope this is helpful, if you have comments, please email:
napier@nca-corp.com
Ralph
vbregfix.zip [144.96 Kb] (Count: 5)