tags:

views:

1928

answers:

5

I'm a web developer and my current task is to build an ActiveX component.

It's the first time I have to work with ActiveX and I managed to make an working example.

However I cannot make the ActiveX install from a browser. When installing it using visual studio 2008 and running the web page all works as expected, when I don't have it installed I would expect something similar to windows updates asking me if I allow the installation but this does not happen....

Here is how I'm placing it in the web page:

<object id="myActiveX" name="myActiveX" classid="clsid:A68B19C8-9DB4-49e4-912F-37FB44968528"
                 codebase="http://localhost/myWebSite/install.cab#version=1,0,0,0"&gt;&lt;/object&gt;

The guid in the classId matches the guid I created for my class.

Can anyone point out what I'm missing?

Edit:

Forgot to mention this, I have a Setup Project for my ActiveX that generates an .msi and an Setup.exe

i have made a cab file with those using a .inf file as so:

[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Setup Hooks]
hook1=hook1

[hook1]
run=msiexec.exe /i %EXTRACT_DIR%\Install.msi /qf
A: 

Well I'm still trying to figure this out, just for the fun of it try googling for "how to autoinstall activex" without the quotation marks.

Feels like going round and round in circles...

Sergio
+1  A: 

You might want to check your IE security settings: By default, unsigned ActiveX controls are ignored.

Here's another possibility:

Did you mark your control as "Safe for scripting" and "safe for initialization"?

I'm not sure this is the issue you're running into since 1) your sample HTML code doesn't show that you're using the control in a script and 2) said HTML snippet doesn't show that you set control properties. However this is a usual trap so if I were you, I'd give a look.

IIRC this can be achieved either by implementing the IObjectSafety interface or using registry settings.

This and this are 2 pointers to get you started.

Serge - appTranslator
A: 

Thank for the reply.

The security settings where the first thing I checked.

I'm using the control on page load like so: <body onload="document.myActiveX.myMethod();">

The class in my activeX control is already implementing IObjectSafety..

At this point I'm pretty sure that my problem is in the INF file. I've extrated the cad to an empty dírectory, modified the run=msiexec.exe /i %EXTRACT_DIR%\Install.msi /qf to run=msiexec.exe /i c:\temp\Install.msi /qf then right clicked on the file and clicked "Install".

This is the first INF file I'm writting and i think that this should launch the msi file, which is not happening...

Sergio
A: 

I've successfully run msiexec.exe from command line, know i just need to figure out why it's not running in the INF file...

Anyone got a clue?

Sergio
A: 

It's working, I have absolutely no idea of what was wrong with it..

Thanks for the answer ;)

Sergio

related questions