PDA

View Full Version : Registering an ActiveX control



JackRandall
09-28-2004, 07:54 AM
BIG BIG NOTE SORRY BUT MY ENGLISH

Setup Factory 7 is beautifull but canĀ“t register extern ActiveX controls, i have in my application HookMenu.ocx and version 6 can register but 7 no, and other control made for me, in my project with version 6 install a file in DAO folder but version 7 says CanĀ“t create DAO folder or something that.

Anyway i'm wait for Setup Factory 7 .

Suggestion: implement the option a screen to choose language or default selection.

ok thas all Congratulations IndigoRose

csd214
09-28-2004, 08:10 AM
Suggestion: implement the option a screen to choose language or default selection.

Sorry, I don't know anything about how to register ActiveX controls, but

The language support in Setup Factory 7 is marvellous!

May be I don't understand your issue?

Ted Sullivan
09-28-2004, 09:35 AM
Setup Factory 7.0 fully supports registration of ActiveX controls.

There are two ways to do it:

1. Add the ActiveX control to your project. Double-Click to bring up File Properties (http://www.indigorose.com/webhelp/suf70/Program_Reference/Files/Properties/Single/Advanced.htm) and click on the Advanced tab. Now check the box that says "Register COM interfaces" in the OLE/ActiveX section. The Command Reference describes this option as follows:



Try to register this file if it is a COM Interface file. This will only work for controls that properly support the DLLRegisterServer interface. This option should properly register ActiveX controls (OCX) and other OLE inproc servers.

You can use the Test button located to the right of this checkbox to test the current file and see whether it supports DLLRegisterServer.

Tip: By default if the registration fails, an error dialog is shown (if the install is not running in silent mode). If an error occurs, the function g_OnRegisterFileFailed is called. If you would like to suppress this error message or handle the way Setup Factory handles this situation, you can modify this function defined in the file _SUF70_Global_Functions.lua located in the Includes\Scripts folder of the main Setup Factory 7.0 folder. The preferred method is to redefine the function in your project by copying and pasting it into the Resources > Global Functions and then making the desired modifications.


2. The second method is to use the action System.RegisterActiveX (http://www.indigorose.com/webhelp/suf70/Program_Reference/Actions/System.RegisterActiveX.htm) on your "On Post Install" actions tab.



System.RegisterActiveX ( string Filename )

Description
Registers an ActiveX control on the local system.

Note: This will only work for controls that properly support the DLLRegisterServer interface.

Parameters
Filename
(string) The full path to the ActiveX control file.

Returns
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example 1
System.RegisterActiveX(_SystemFolder .. "\\mycontrol.ocx");

Registers the ActiveX control named "mycontrol.ocx" located in the user's system folder.

Note: _SystemFolder is a built-in variable that contains the path to the user's "System" folder.