How do you register an ActiveX EXE on Vista?

J

Joseph Geretz

MyApp.exe /RegServer
MyApp.exe /UnregServer

As far as I am aware, the specs state that running a VB6 ActiveX EXE results
in the silent launch of the executable, the registration of the COM details
into the registry (or unregistration) and then the termination of the
executable.

Why has this changed on Vista?

With Vista, launching the application results in the application continuing,
even if these command line switches are passed. This is throwing a monkey
wrench into my installer; all I want to do is register these programs during
the install, I don't actually want to run these programs during the install.

Thanks for your help!

- Joseph Geretz -
 
J

Joseph Geretz

Why won't the ActiveX EXE launch elevated when it is launched from an MSI
which is runnign elevated?

First of all, the installer is running elevated. I get the Vista prompt
screen An unidentified program, etc... Once I click to proceed, the MSI
should be running elevated, no?

But for some unidentified reason, the launch of the executable from within
the MSI is not occurring elevated. The error I get during the install is
"Unexpected error; quitting" which is the same error I get when running
MyExe.exe /RegServer from the Start | Run.

So if the MSI is running elevated, why the @!#$^@^#$% isn't MyExe launched
as elevated from within the MSI?

Hey all you Microsoft gurus. Can't I get some help with a simple question?

Thanks!

- Joseph Geretz -
 
J

Joseph Geretz

Hi Jon,
Have you installed the VB6 runtime files?

Of course. (This is an installer which has been running successfully,
pre-Vista, for years.)

To add to the problem description:

If I create shortcut which links to "MyExe.exe / RegServer" then right-click
and select Run as Administrator then the program runs and registers as
normal. So the registration will succeed if the program is launched as
elevated. However, I can't figure out how to do this from my MSI and I don't
understand why it's not happening naturally, since hte MSI itself is already
running elevated.

- Joe Geretz -
 
J

Jon

Yes, that is odd.

It sometimes seems that some extensions are favoured more than others. For
example, you can right-click on a .exe file or a .bat file and choose to run
them as administrator, but you can't do the same for a .vbs file or a .msi
file.

Not that that helps at all, but thought it worth mentioning.
 
J

Joseph Geretz

The name of the msi incorporates the 'magic term' Setup (yippee!) so the msi
is running elevated. When the msi is launched, I get the Vista elevation
prompt, so after responding in the affirmative, the msi is running elevated.
Consequently, any applications launched from within the MSI should be
granted elevated status as well.

But this just doesn't work!!!

Heeeeellllooooo! Microsoft? Do you have any interest in supporting the
deployment of ActiveX executables, or have you finally decided that these
are ready for the garbage heap? Your marketing guys getting tired of
marketing ActiveX?

- Joseph Geretz -
 
J

Jon

Try it in a one-line batch file "wrapper" for your .msi file
ie containing

c:\<...path to msi file>mysetupfile.msi

and then set the batch file to run as admin via right-click > properties

If that works, then you could work out ways of running that invisibly to
avoid black boxes all over the screen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top