ActiveX register / unregister Custom Action - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jjreilly
Posts: 5
Joined: Wed Oct 17, 2012 4:30 pm

ActiveX register / unregister Custom Action

Hi,

I am evaluating AI (Pro) 9.6 build 47481.

I have several VB6 ActiveX out-of-process (.exe) servers. It appears self-registration is the only option. If I try to set the "Auto register" -> "Extract registration" property, it fails to extract any information.

So I created a custom action to register the control on install, and a custom action to unregister on uninstall.

By trial and error, I found that I had to move the install action to after the "Finish Execution" stage so that the file and its dependencies were already copied into the install folder before I tried to install it. does this seem correct? The install custom action looks like this:

Source Path: APPDIR\SWCOVR32.exe
Source Type: Executable (*.exe)
Command: /regserver

Where should I put the uninstall action? It obviously needs to run prior to any of the files being removed from the disk. After "Preparing"? Is after "Remove Resources" too late?

Source Path: APPDIR\SWCOVR32.exe
Source Type: Executable (*.exe)
Command: /unregserver

Thanks.

-John Reilly.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: ActiveX register / unregister Custom Action

Hello John,
By trial and error, I found that I had to move the install action to after the "Finish Execution" stage so that the file and its dependencies were already copied into the install folder before I tried to install it. does this seem correct? The install custom action looks like this:

Source Path: APPDIR\SWCOVR32.exe
Source Type: Executable (*.exe)
Command: /regserver
In order to achieve this you can schedule the related "Launch installed file" custom action with sequence after "Install Execution Stage -> Add Resources" action group. Then, from "Custom Action Properties" right pane you should set it as follows:
  • Execution Properties: Synchronous Execution, ignore return code
    Execution Options: Deferred with no impersonation
Also, you can take a look on our "Registering EXE activeX" thread.
Where should I put the uninstall action? It obviously needs to run prior to any of the files being removed from the disk. After "Preparing"? Is after "Remove Resources" too late?

Source Path: APPDIR\SWCOVR32.exe
Source Type: Executable (*.exe)
Command: /unregserver
The uninstall custom action should be scheduled before "Install Execution Stage -> Remove Resources" action group. Also, from "Custom Action Properties" right pane you should set it as follows:
  • Execution Properties: Synchronous Execution, ignore return code
    Execution Options: Deferred with no impersonation
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jjreilly
Posts: 5
Joined: Wed Oct 17, 2012 4:30 pm

Re: ActiveX register / unregister Custom Action

Thanks, Daniel. That worked like a charm.

I had seen the other posts, but the instructions were for much older versions of AI and it is hard for me (sometimes) to make the translation to the new tool, being as this is my first foray. If I have one complaint about AI, it is that the documentation and forums frequently tell me how to do something in an older version, and I can't make the connection to the new 9.6 version.

Although I'm liking it well enough at the moment.

Regards,
-John.

Return to “Common Problems”