How to insert a 32 or 64-bit ActiveX control on the same page depending on the browser?

I have an ActiveX control that has 32 and 64-bit versions for 32-bit and 64-bit browsers. At runtime, I can detect the browser version and redirect to the copied deployment of the same pages, but referring to the 64-bit code base. Is there a way to have one set of pages but change the reference base code file (.cab file) at browser-based runtime? This is in Visual Studio ASP.NET, with a control built into the form at design time.

+4
source share
1 answer

This is the client side, you should be able to use this code in any IE that supports ActiveX:

<script language="javascript"><!-- var cab_to_download = "http://server/activex." + window.navigator.cpuClass + ".cab"; --></script> 

you should name your CAB files activex.x86.cab and activex.x64.cab in the sample and use this for your codebase="" attribute with some call to document.write() on the client side.

+4
source

Source: https://habr.com/ru/post/1344804/