Because the OCX control is used in development, if no corresponding ocx file exists on the target machine, it will cause the applicationProgramUnable to run normally, I took a detour when registering the OCX control with installshield2009. I first used the INF file and wrote the rundll32 + inf file name in installscript. In this way, the OCX control can be correctly loaded, but the loaded ocx file will be detached during uninstallation. After searching for information, we found that InstallShield provided the automatic registration control function, such as self-loading OCX. The process is as follows:
Step 1: The Project Assistant> Application Files> Windows directory contains three subdirectories: fonts floder, Windows system, and Windows System (64bit ). If the control is installed on a 32-bit operating system machine, you can select Windows system. Here I select the Windows System directory. Click addfiles to add a self-registration file to the Windows System directory, in this way, InstallShield will install the control to the System32 directory of the system disk during installation. If you need to install the control to the subdirectory of the System32 directory of the system disk, you can create subdirectories in the Windows System directory.
Step 2: Choose installation designer-> orgnization-> setupdesign-> default feature. The default feature directory contains the selfregfiles directory. Click selfregfiles. The sefregfiles attribute is displayed on the right. The shared property is true, set the uninstal attribute to false and the Self-register attribute to true, so that your registration control can be successfully registered on the target machine and locked by other programs, it will not be uninstalled during reverse installation.