|
The setup program for the application must do the following tasks when installing the executable version of the application. This is almost automatic when using the VB Setup Wizard. These two steps are here to illustrate what is actually done so that it can be done manually, if necessary.
1. All .OCX and DLL files must be copied into the appropriate system directory for the Windows platform you are using. For Windows 3.1 and Windows 95, this is \Windows\System. For Windows NT, this is Winnt\System32. For 16 bit OCX versions on Windows NT, this is Winnt\System. The .LIC files are not distributed. 2. Register the OCX's. Use regsvr (16 bit OCX's) or regsvr32 (32 bit OCX's) to register each OCX. Use the command line 'regsvr(32) /s filename' The complete usage is as follows: regsvr [/u] [/s] dllname regsvr32 [/u] [/s] [/c]] dllname /u - Unregister server. /s - Silent; display no messages. /c - Console output. (32 bit only)
If using the VB Setup Wizard, the above two steps are almost automatic because the OCX is already included in the setup project. However, two things must be added for each OCX in the project.
1. Add the appropriate DLL file(s) that supports the OCX. This is done in step 4. 2. After the setup wizard is finished generating the setup disks, edit the SETUP.LST file that the setup wizard created. Add the $(DLLSelfRegister) attribute to the OCX file line(s) in the SETUP.LST file as follows: File4=1,,Ax4.oc_,Ax4.ocx,$(WinSysPath),, $(Shared),2/3/1998,52224,1.0.0.1 becomes File4=1,,Ax4.oc_,Ax4.ocx,$(WinSysPath), $(DLLSelfRegister),$(Shared),2/3/1998,52224,1.0.0.1
When this is complete, the setup program will copy all OCX and DLL modules to the Windows/System directory and register them for use by the application.
If the application is being distributed without a setup program, the two steps in part one of this question must be done manually.
|