ActiveX Control Not Installing Automatically

时间:2015-10-30 23:10:08

标签: c# activex activexobject

I have written a simple activex control in c# and created its .msi installer and packaged it in .cab file. when i runs the .msi installer by manually, it installs the activex control and works fine from browser. but when browser prompts for automatic installation, it does not gets installed.

I am using windows server 2008 64 bit and IE 11.

.INF

[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
AxControlsInstaller.msi=AxControlsInstaller.msi

[AxControlsInstaller.msi]
file-win32-x86=thiscab
RegisterServer=yes
clsid={1FC0D50A-4803-4f97-94FB-2F41717F558D}
FileVersion=1,0,0,0

I have following the following tutorial to create the control. it works till step 16 but prompts for installation after every refresh and not gets installed.

http://www.slideshare.net/yudep_apoi/steps-how-to-create-active-x-using-visual-studio-2008

[IE setting change]

Run ActiveX and plug-ins – Enabled

Download Signed ActiveX Control – Enabled

Script ActiveX controls marked as safe for scripting – Enabled

Download unsigned ActiveX Control – Prompt

Initialize and script ActiveX controls not mark as safe – Prompt

1 个答案:

答案 0 :(得分:0)

看看this问题和我的回答。它应该是你正在寻找的。

我使用msiexec来安装activex但不是直接但是通过我自己的runmsi.exe文件。后来我对这种方法做了一些修改。我从msi安装程序转到exe(安静安装),我现在直接引用exe安装程序(以下代码片段未经过测试但应该可以正常工作)

[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Deployment]
InstallScope=user|machine
[Setup Hooks]
install=install
[install]
run="""%EXTRACT_DIR%\simpleactivex.exe"""

你仍然需要制作出租车并签署一切 - activex,exe安装程序,cab文件。签名时使用时间戳,如我的答案所示。可以找到空闲时间戳权限列表here