Hyperspectral1966
Posts: 1
Joined: Tue Sep 11, 2012 11:26 am

Problem Registering an ActiveX Control

Hi
We've recently purchased Advanced Installer so we're still having a few teething problems.
One of these is registering an ActiveX Control (an OCX file) during the installation Process.

To do this manually I would copy our activeX control (lets call it myActiveX.ocx) to the Windows/System32 directory
Id then type at the the command line;

regsvr32.exe myActiveX.ocx

Can someone explain the steps required to do this using Advanced Installer?
I think Ive almost got the correct steps but there is a "regsvr32.exe" error when I run the installation and a dialog box appears
with a message that includes the following;

"A program run as part of the setup did not finish as expected"

Ive also included a screenshot from the Custom Actions page that shows some of the settings. Perhaps there is an obvious error there.

Thanks/
Attachments
advancedInstallerCustomActions.jpg
advancedInstallerCustomActions.jpg (221.47 KiB) Viewed 8606 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem Registering an ActiveX Control

Hi and welcome to Advanced Installer forums,

You took the long way around with this. You can first try to use the auto-register option from the Files and Folder page in the .OCX file's context menu -> Registration Tab.

For the custom action approach you can try following these steps:
- in the Custom Actions page create a new "Launch EXE with working directory" custom action after "Add Resources" action group
- when prompted to choose an installation folder, select "Windows Volume\Windows\System"
- in the Custom Action Properties page set the "Full Path" field to:

Code: Select all

regsvr32.exe
- use the "Edit" button next to this field to select the file you want to register
- make sure that the file reference is enclosed by quotes (")

For example, the "Full Path" field should look something similar to this:

Code: Select all

regsvr32.exe "[#myActiveX.ocx]"
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pschroeder
Posts: 4
Joined: Tue Oct 22, 2013 6:29 am

Re: Problem Registering an ActiveX Control

I have a COMServer written with Borland Delphi6. For registration I need Borland tregsrv.exe.

Under Windows XP this way of installation is running well.

But under Windows 7 and 8 the installation needs "AsAdministrator"-Rights.
If I use the command with a batch-file and AsAdministrator option, all is sucessful.
My installbuild is using AsAdministrator !

Under "property" I found "AdminProperties" and "AdminUser". But I have no success with them.

But there is a second problem with win7/8 AND winXP too. Deinstalling of the program is not possible. Please look the attached screenshot.
Attachments
Error message at the end of deinstalling
Error message at the end of deinstalling
ErrorMessage.jpg (10.87 KiB) Viewed 8281 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem Registering an ActiveX Control

Hi and welcome to Advanced Installer forums.
But under Windows 7 and 8 the installation needs "AsAdministrator"-Rights.
Indeed, under Windows 7 and 8 your custom action needs administrator rights, however it should have these rights if it is placed under the "Install Execution Stage -> Add Resources" action group. You can also try to check the "deferred" with "no impersonation" options.
Under "property" I found "AdminProperties" and "AdminUser". But I have no success with them.
The above properties stores information about the user accounts, they are set if the user that installs the package has administrator rights. For more details you can read the AdminProperties and AdminUser MSDN articles.
But there is a second problem with win7/8 AND winXP too. Deinstalling of the program is not possible. Please look the attached screenshot.
This happens because your custom action is triggered during the uninstallation of the package too, but some resources that it needs are not found. To go around this problem you can check only the "Install" option from the "Execution Stage Condition" and uncheck the "Uninstall" and "Maintenance" options.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pschroeder
Posts: 4
Joined: Tue Oct 22, 2013 6:29 am

Re: Problem Registering an ActiveX Control

Hello,
thank you for answering quickly.

First the good message. The uninstall problem is solved. There is no error message and all is uninstalled.
I checked it under Win7 only, but this should not be a problem of the OS.

But the other problem is not solved. Please look to the screenshot. You see the last used settings.
We are using version 9.8.
Attachments
My AIsettings
My AIsettings
AI_Settings.jpg (69.79 KiB) Viewed 8268 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem Registering an ActiveX Control

Hi,

I'm not sure why you encounter this behavior. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pschroeder
Posts: 4
Joined: Tue Oct 22, 2013 6:29 am

Re: Problem Registering an ActiveX Control

I have sent you the data
Thank you for service
Peter
GlenT
Posts: 118
Joined: Mon Jul 16, 2012 8:44 pm

Re: Problem Registering an ActiveX Control

Not sure if this is helpful, but we reported more than a year ago that AI does not extract COM registration info from executables generated by RAD Studio - C++ Builder. Not sure about Delphi, or if this is at all related to your issue.
pschroeder
Posts: 4
Joined: Tue Oct 22, 2013 6:29 am

Re: Problem Registering an ActiveX Control

The problem is meanwhile solved. Look to the screenshot. It seems, that this solution is only
necessary for the old borland program tregsvr.exe
Attachments
SrvReg.jpg
SrvReg.jpg (143.65 KiB) Viewed 8195 times

Return to “Common Problems”