· Sep 4, 2020

Replace ActiveX in ZEN interfaces running in Chrome and Edge?

Does anybody have a solution for replacing ActiveX in ZEN interfaces running in Chrome and Edge?

I am not able to modify security settings in either browser, hence looking for a replacement for those controls.



                                var loc new ActiveXObject("WbemScripting.SWbemLocator");
                                var objWMIService loc.ConnectServer(".", "root\\cimv2");
                                var colItems objWMIService.ExecQuery("Select * From Win32_Printer Where Default = TRUE", "WQL", wbemFlagReturnImmediately wbemFlagForwardOnly);



                                var loc new ActiveXObject("WbemScripting.SWbemLocator");
                                var svc loc.ConnectServer(".", "root\\cimv2");
                                coll svc.ExecQuery("Select * from Win32_ComputerSystem");
                                var items=new Enumerator(coll);
                                var tUNC=(items.item().DNSHostName)+'.'+(items.item().Domain)

                                col2 svc.ExecQuery("Select * from Win32_LogicalDisk where Name='U:' and DriveType=4");

Thank you for all input.

Discussion (3)0
Log in or sign up to continue

To find a good replacement, the most important to know is a reason, why you need this information in the browser?

The first sample looks like you are looking for a default printer in the system.

And the second one, looking for a specific disk drive, with the letter U, and it should be network drive.

How are you going to use this information after that? Maybe the best way will be to completely change the way how you doing it or just forget about it.

Anyway, this happens due to a wish from browsers vendors, to increase a security level, so, they completely declined to use NPAPI and ActiveX. And as a side-effect of it, it's now impossible to use Java applets as well. And usually, to fix it, the simplest way was to create own simple application, which has to be installed on the users machine, and web-application application was able to connect to locally installed application through WebSockets or simple rest API in that application. 

ps. I can help you with development if you need any help.