This project is read-only.

Best practices for installation and development

Dec 5, 2015 at 7:14 PM
This is probably my own fault for not paying attention to details during installation or not understanding the implications of my choices, but...

Some months ago, I installed MapWinGIS to develop a custom, MS Access application. This was probably installed with MapWindowsLite (I don't recall the details). I had installed it into an arbitrary folder outside the conventional Program Files structure. Subsequently I installed MapWindows 5 into its default folder inside Program Files. Today I received the email about a new version of MapWindows, which I then installed into its default folder, thus overwriting the previous version in that same location. Looking at the MapWindows Help>About, I notice that MapWindows uses MapWinGIS v., as mentioned in the documentation. So far, so good.

Opening the map in my custom application (MS Access) I notice that it uses MapWinGIS v, which is understandable because I installed it into a different folder. So I downloaded the latest version and initiated the installation. It offered to install into C:\dev, which is neither the location where I installed it previously, nor the Program Files folder where MapWindows is installed. So I aborted the installation to figure stuff out and write this message.

My questions or observations:
  • is it advisable to use the same physical copy of MapWinGIS for custom applications and the engine for MapWindows? If so, is it simply a matter of installing into the same folder?
  • is it necessary to install MapWinGIS if the full MapWindows is already installed? If not, how do I tell the system to use the version from full MapWindows, instead of the one that I previously installed in an arbitrary folder?
  • (I believe that) I've seen some documentation that MapWinGIS does not require registration with Windows. Is that the case, or did I misunderstand something? Clearly my computer is using two different versions of MapWinGIS.
  • the MapWinGIS installer should notice which folder it is currently installed into, and offer to install the update into the same folder. Perhaps it should also change its behaviour if MapWindows is currently installed, and offer to use that location.
Dec 7, 2015 at 10:17 AM
MapWindow5 no longer requires you to register MapWinGIS. This means you can have multiple versions of MW5 on your pc. MW5 is using the manifest files to find the ocx.
When you use MapWinGIS in your own application it's getting a bit more complicated. To be able to compile your application you need to register MapWinGIS.ocx because else Visual Studio can't find it.
You can register the version of MapWinGIS in your MW5 folder. The binaries are the same.
You can use these commands:
REM Unregister any previous versions:
regsvr32 /u /s MapWinGIS.ocx
REM Register current version:
regsvr32 MapWinGIS.ocx
A more future-stable solution is to convert your application to a MW5 plug-in. Then you will have all the benefits of MW5 and you don't have the issues with multiple versions/applications. Your users will also appreciate it more ;)


Dec 7, 2015 at 3:01 PM
Yeah, I am pretty much stuck in the past...
Thanks for the clarifications. Helps a lot.
Dec 8, 2015 at 10:36 PM
Whew... figured it out. Tried several times to unregister and re-register the OCX, but my MS Access 2003 program always reported using the previous version of MapWinGIS control. Then I tried to manually edit the Windows Registry to point to the new folder (time-consuming waste of effort!), before I realized I was encountering a 32-bit vs 64-bit problem in MS Access. So I installed the 32-bit version of MapWindow into a different folder, registered the OCX as you instructed, and it worked properly. The map control now reports that it's using the latest MapWinGIS.

Lessons learned - don't mess with the registry, and MS Access requires 32-bit.

Is there any functional difference between 32-bit and 64-bit? If not, I should delete the 64-bit version for simplicity. Also, it would be useful for the Help > About screen to mention which version is being run.

Thanks again.
Marked as answer by pmeems on 12/9/2015 at 4:06 AM
Dec 9, 2015 at 12:06 PM
You are right. I forgot to mention you need the 32-Bit version if you want to use it in MS-Office and Visual Studio because Microsoft doesn't like 64-Bit ActiveX controls.

Functional the 32-Bit and 64-Bit version are identical.

About the Help --> About I submitted it here: