[英]ActiveX Control Not Installing Automatically
I have written a simple activex control in c# and created its .msi installer and packaged it in .cab file. 我已经用c#编写了一个简单的activex控件,并创建了.msi安装程序并将其打包在.cab文件中。 when i runs the .msi installer by manually, it installs the activex control and works fine from browser.
当我手动运行.msi安装程序时,它将安装Activex控件并在浏览器中正常运行。 but when browser prompts for automatic installation, it does not gets installed.
但是当浏览器提示自动安装时,不会安装它。
I am using windows server 2008 64 bit and IE 11. 我正在使用Windows Server 2008 64位和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.
它可以工作到第16步,但是在每次刷新后提示安装,并且没有安装。
http://www.slideshare.net/yudep_apoi/steps-how-to-create-active-x-using-visual-studio-2008 http://www.slideshare.net/yudep_apoi/steps-how-to-create-active-x-using-visual-studio-2008
[IE setting change] [IE设置更改]
Run ActiveX and plug-ins – Enabled 运行ActiveX和插件-已启用
Download Signed ActiveX Control – Enabled 下载签名的ActiveX控件-已启用
Script ActiveX controls marked as safe for scripting – Enabled 标记为可安全编写脚本的脚本ActiveX控件–已启用
Download unsigned ActiveX Control – Prompt 下载未签名的ActiveX控件-提示
Initialize and script ActiveX controls not mark as safe – Prompt 初始化和脚本化ActiveX控件未标记为安全-提示
Take a look at this question and my answer. 看看这个问题和我的答案。 It should be what you are looking for.
它应该是您要寻找的。
I am using msiexec to install the activex but not directly but through my own runmsi.exe file. 我正在使用msiexec安装Activex,但没有直接安装,而是通过我自己的runmsi.exe文件安装。 Later I made some modifications to this approach.
后来,我对该方法进行了一些修改。 I went from msi installer to exe (quiet installation) and I am now referencing the exe installer directly (the following snippet was not tested but should work)
我从msi安装程序转到exe(安静安装),现在我直接引用exe安装程序(以下代码段未经测试,但应该可以使用)
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Deployment]
InstallScope=user|machine
[Setup Hooks]
install=install
[install]
run="""%EXTRACT_DIR%\simpleactivex.exe"""
You still have to make cab and sign everything - activex, exe installer, cab file. 您仍然必须制作cab并签署所有内容-activex,exe安装程序,cab文件。 Use timestamp when signing as is shown in my answer.
如我的答案所示,在签名时使用时间戳。 List of free timestamp authorities can be found here .
免费的时间戳授权机构列表可以在这里找到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.