registering ActiveX EXE with installshield

Posted on 2005-05-02
Last Modified: 2013-11-14
I'm using installshield and i've got a pure installscript project - and i'm trying to get the installer to register a VB6 ActiveX EXE upon installation.

how do i do this?  i've already got the exe marked as "self-register".  I'm using installshield 10.5 - and its building the installer just fine except for this thing.

If i run the installer on a blank machine - it installs everything but doesn't register the exe and when i fire up the main .exe of the application it throws an error.  The first line of my application even calls shell("nameofexe.exe /REGISTER") but that doesn't work.

when i manually go to the command line on the machine, navigate to where the exe has been installed and then run nameofexe.exe /REGISTER - after that the installed application works perfectly.

Question by:kenshaw
    LVL 26

    Expert Comment

    have you tried

    shell("nameofexe.exe /regserver")
    LVL 4

    Author Comment

    yeah - i thought i mentioned that?
    LVL 12

    Expert Comment

    Hmmmmmmm......what about:
    shell("regsvr32 nameofexe.exe")

    You may need to include the path to the file:
    shell("regsvr32 c:\somefolder\nameofexe.exe")

    Hope this helps!
    LVL 4

    Author Comment

    i didn't think i could use regsvr32 for ActiveX EXE's...

    isn't there a way to do this with installshield though?  i thought that was the whole point of using it
    LVL 26

    Accepted Solution

    I usually do it in installshield, i'm using 6.3 not 10 but the ideas should be the same

    On your shell script


    function OnFirstUIAfter()
        STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
        NUMBER bOpt1, bOpt2;      
        STRING svPath, szProgram, szCmdLine;
        svPath = TARGETDIR ;
        szProgram = svPath + "\\nameofexe.exe ";
        szCmdLine = "/regserver";
        if (LaunchAppAndWait(szProgram, szCmdLine, WAIT) < 0) then
            MessageBox("LaunchAppAndWait failed to register " + szProgram, SEVERE);

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    I have been scripting applications way too long and can never remember how to create an ISS file.  So I decided to write this article to act as my own knowledge base for future reference, and hope you will also benefit. An ISS file is a response …
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now