Packaging ActiveX Controls with Wix MSI [closed]

纵然是瞬间 提交于 2020-06-28 11:00:45

问题


I need to create MSI using Wix. My application has Active X control. When any user gets connected or visit the URL on the web my application needs to be installed in the user machine. The path where I need to install is C:\Windows\Downloaded Program Files\CONFLICT.xx and this folder should contain the file ATL80.dll, app.dll, MSVCP80.dll MSVCR80.dll. I saw few articles but got confused with them. please let me know how to start for this and what steps i need to follow in order to make MSI.


回答1:


There is more to this: Packaging ActiveX Controls.

Essentially a web page will request a signed cab to be downloaded and installed via a CODEBASE URL, like this:

(sample from the Microsoft article linked above)

<OBJECT CLASSID="clsid:dcf0768D-ba7a-101a-b57a-0000c0c3ed5f"
    CODEBASE="http://webserver/time.cab"
    ALIGN="CENTER" WIDTH=270 HEIGHT=26 ID="T1"><PARAM NAME="Interval" VALUE=1000>
    <PARAM NAME="Enabled" VALUE=1></OBJECT>

The requested cab is downloaded (time.cab), and installed (standard Microsoft cab installation / extraction). The next time the web page is opened the Active X control should work as expected. That's the normal case (admin rights are required for this to work). A successful install here can be captured and packaged as an MSI. Heavy cleanup is required though, due to all the certificates that are involved to complete the install. None of the certificates are required in the MSI as I recall, since an MSI runs with admin / elevated rights and dump files straight in the folder. Quite a security problem if you ask me, but these cabs are rarely deployed this way. Unsigned cab files won't work though (unless IE is customized).

The CONFLICT folder that is created in this users case indicates that there are discrepancies between the installed files from the cab and the version of those files specified and expected by the web page. This causes IE to trigger a new CAB download. Upon discovering the same files already exist in C:\Windows\Downloaded Program Files\ a new CONFLICT sub folder is created each time, and the user gets prompted for a new Active X installation every time the page is opened.

You must work to resolve the file versions specified by the web page and the versions of the files found in the cab. These versions must match. I can't recall all the details, but it might be that all that is checked is the CAB file version:

(Sample from this Microsoft article)

<object id="CommonDialog1" width="32" HEIGHT="32"
    classid="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
    codebase="http://activex.microsoft.com/controls/vb5/comdlg32.cab
    #Version=1,0,0,0">
</object>



回答2:


This is really a question about the Visual C++ redistributables because ActiveX controls installed from a web page don't need installing with an MSI. If that's all you're doing then the short answer is that you get hold of the VC 2005 redistributable and run it, this kind of thing:

http://www.microsoft.com/en-us/download/details.aspx?id=3387

This installs the C++ support files like ATL80.dll etc in the right places and it just works. You don't get much say in where they go:

http://msdn.microsoft.com/en-us/library/ms235316(v=vs.80).aspx

It's dangerous to have your private versions of those Dlls because there are security fixes for them, and if you have a private copy that the MS security updates can't find and fix then you effectively become responsible for maintaining them on the client systems.

On the other hand, I can't be sure from your question if you have a separate MSI file with a lot of other stuff in it (not the ActiveX) that you want to install by having people download it.



来源:https://stackoverflow.com/questions/26190171/packaging-activex-controls-with-wix-msi

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