COM / ActiveX Installation Hell & Solutions |
Top |
1. | Locate Windows System Directory. This may vary from machine to machine, some installers may place DLLs in c:\windows\system instead of c:\winnt\system32, etc. |
2. | Check Windows System Directory for presence of a file with the same name as your COM component. |
a. | If file exists, check DLL for a "DLL version" number and compare with DLL version number of our COM component |
b. | If file has no "DLL version" number, then compare file Last-modified time with the last-modified time of our COM component |
c. | If DLL file in Windows System Directory is newer than our file, then don't install and hope everything works. It may be that the file exists, but is not registered in the system registry - there is no way check for this case - in which case your application may fail . |
3. | Extract the COM DLL file to the Windows System Directory. Replacing an older version of a COM control with a newer one that is not 100% backwards compatible may cause other applications to fail. |
a. | If write permission to the file is not allowed, then one of the two is probably true: |
i. | The DLL is use by another application . In this case you need to setup a Copy-on-reboot operation. You also need to instruct your installer to continue after reboot so that the COM component can be registered after it has been copied. To do this you need to: |
1. | Setup a StartUp Shortcut to run your installer. |
a. | Access to the StartUp Shortcut may be restricted. |
ii. | The system may have restricted file access to the windows system directory. In this case, you need to instruct the user to log in as Administrator in order to install your software. |
b. | The extract operation could fail because of limited disk space on the windows system drive. Even if the system initially reported there was enough disk space, it may have changed since you last checked - or the system was over estimating availability based on compression. In this case you need to have kept a backup of the old COM component so it can be restored and you can back-out of the installation gracefully. |
4. | Register the COM DLL. On many corporate and educational systems, access to the system registry is restricted to read-only access. In this case the COM registration will fail - maybe without reporting an error. |
a. | If COM registration fails, the only option is to back-out of the registration. In this case you need to copy the old COM DLL backup to its original location. Since system registry access is restricted, COM registration of the old DLL may fail. |
b. | After the old DLL has been replaced, the user must be instructed to log in as Administrator and try again. There is no guaranteed way to know before installation begins if it will fail. |
· | Another Application installer overwrites your COM control with an older version - Many installers do not properly check version numbers before copying files to the Windows System directory. This is the one of the top sources of problems for COM developers, it is very likely to happen to you and there is little you can do to prevent it. |
· | Another Application installer overwrites your COM control with a newer version that is not 100% backwards compatible. There are many instances where this problem arises. |
· | Another Application uninstaller removes/moves/renames the COM control DLL file which your application needs to run. |
· | Another Application Uninstaller unregisters your COM control from the system registry. |
· | Another Application modifies your COM registry keys to an incompatible setting. |
· | The user inadvertently changes files or registry keys associated with your COM control. |
· | The user recovers from a crash or virus attack by using a system restore of the registry or windows directory. In this case the COM control may become unregistered. |
· | The user restores your application, but not the system registry after a system reinstall. |
· | Administrator rights are never required. Because no system registry changes are needed to use COM components, your software can be installed and run without Administrator rights - even on systems with restricted file system and registry access. |
· | No possibility of causing other applications to fail. Because your application does not modify any files in the Windows system directory and does not make any changes to the system registry, there is no way for your application to cause other applications installed on the system to fail. |
· | No possibility of other application installs/uninstall breaking your application. Because your application is deployed and run as a single EXE file, you eliminate almost all dependencies on outside files and registry keys. |
· | Install process becomes trivial. Now your application can be copied to a new location or computer and run without needing a reinstall process. You can place a single EXE on a network drive and users can run it directly without installation. If the operating system is reinstalled with a blank registry your application will not be effected. |
· | Uninstall process becomes trivial. To uninstall your application simply delete it. There is no chance to cause other applications to fail by accidentally deleting DLLs or registry keys needed by other applications. |
· | No source code changes needed. Thinstall loads almost all 32bit Windows applications and COM files without source changes, including 3 rd party COM components. |
1. | The Virtual Operating System ( VOS). The VOS allows you to load and run COM and DLL and EXE files directly from your package file, bypassing Windows normal loading procedures for DLL loading and COM object creation. |
2. | The Virtual File System (VFS). The VFS is a compressed read-only file system that is transparently merged with the real file system. The VFS exists as a section of your EXE and prevents your COM controls from being modified or replaced. |
3. | The Virtual Registry (VREG). The VREG transparently merges virtual registry keys with the real system registry. The VREG makes it appear as though your registry keys have been installed into the system registry, when they always remain as part of your EXE. To make virtual registry creation easier, Thinstall has COM recording abilities that allow you to gather all the registry keys needed by a COM component before deploying it. |