Auto Install activeX [closed]

穿精又带淫゛_ 提交于 2019-12-23 04:30:26

问题


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"></object>

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

回答1:


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.



来源:https://stackoverflow.com/questions/370960/auto-install-activex

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!