Browser Details from javascript without using ActiveX controls - javascript

If i am using "window.navigator.userAgent" or "$.browser" then these are asking me to allow to run the ActiveX controls But My application should not use any of ActiveX controls. Can anyone help me to find the solution for this??

In this instance, "ActiveX Controls" is Internet Explorer code for "JavaScript".
Don't load webpages directly from your file system using Internet Explorer. Run them from a web server instead (which can be installed locally).
You are running into a security feature designed to protect your files from malicious, downloaded HTML documents. In principle, it is a good feature, but it has terrible messaging.

Related

How to open an EXE file from a Client Machine through a Web Application using Chrome

How to open an EXE file from a Client Machine through a Web Application using Chrome?
I am able to open the EXE through Internet Explorer since I am using ActiveX Objects to open the Exe file through client side scripting. But since chrome does not support ActiveX I am unable to open the EXE from chrome. Can somebody provide an alternate way to open the exe from chrome?
I know it works if IETab addon is added to the browser for supporting ActiveX. But the client policy will not accept adding add-ons.
I am trying for a solution as such in WebEx websites where a temporary application is run once and each time it is accessed it opens in the temporary app without each time installing it.
Thanks in Advance..
Short and simple answer, NO! it's not possible just by using plain HTML5/JavaScript API, and thank god it's not possible or else the consequences would be devastating! Imagine any random website executing a file on your computer! That would be the worst security nightmare!
But, there are workarounds!
1. You can, for example, use Flash (but you shouldn't) or Silverlight but as mentioned the OP doesn't want any plugin-based solution so I guess they are not as useful.
2. Another solution would be to deploy a Desktop agent, if possible, and then communicate with it using a local Rest API and handle all the native access in that Desktop agent.
Still, the most preferred way would be to just ask your user to scan (or whatever) the document and upload it to your site.
More references can be found here

Launch a Windows File Explorer window from a webpage

I work in phone support for a company that released a new program that stores some data in the users appdata folder.
Our knowledge base has been updated with steps for users to turn on show hidden/system files and then steps users through opening the folders.
As a lot of our software users are not IT 'savvy', it takes a long time walking them through.
With HTML, Javascript or some kind of plug in, is it possible to make a link on a page that will launch a Windows File Explorer window navigated to %localappdata% ?
This way the user will always end up in the right place without all the steps they find difficult.
No, it isn't possible to launch an external program from within a web page.
If you could do it, it would be considered a massive security risk, and would quickly be blocked by the browser makers.
Years ago, there used to be ways to achieve this sort of thing via ActiveX controls, but that is no longer an option, largely due to the security issues it caused.
The only browser that ever supported ActiveX was IE; it doesn't work at all in any of the other browsers, and even IE defaults to block unknown ActiveX controls these days.
In short, you aren't going to be able to do this. Sorry.
I don't believe this is possible with just HTML / javascript because of permission / security
One possibility is to create a ActiveX control to launch Windows Explorer.
Building ActiveX Controls for Internet Explorer
Wikipedia - ActiveX
You could have users download and run a batch file with something like this in it:
%windir%\explorer.exe %LOCALAPPDATA%
You could even configure the batch file to copy files to a more convenient place, like the desktop.

html to exe> prevent javascript and activex security prompt in internet explorer object

i have some HTML page that I've imported them in a exe file and i load them with internet explorer object . but i receive JavaScript and ActiveX security error whilerunning the exe file.
is it possible to sign my application to IE and prevent these prompts.?
Note: My application will be installed to user computer via an installation file (.msi)
I guess you are using gdgsoft html2exe app. I guess you should better ask in their forums, but in the security settings of internet explorer you can choose the security level ( or maybe you can use one of the other html renderers that html2exe comes with )

Is accessing USB from a web application for cross browser cross OS possible at all?

I am wondering if there is a way we can achieve this. I heard different things about Silverlight 4, JavaScript or ActiveX control, but I have not seen any demo of code for any of them.
Is there a web component that is available or how can I write one?
We really like to capture a client's USB drive via the Web and read/write data on it. This has to work for any operating system in any web browser.
What about WPF in browser mode? I read that I can host my WPF applications inside browser and sort of like smart client.
Here is a great example of doing this via Silverlight 4, but the author mentions about possibility of accessing USB on Mac via:
Enable executing AppleScript scripts.
This option will let us have the same amount of control on a Mac machine as we do on a Windows machine.
Add an overload to ComAutomationFactory.CreateObject() that calls the “Tell Application” command under the scenes and gets a AppleScript object.
This option would work extremely well for Microsoft Office automation. For any other operating system feature, you’ll have to code the OS access twice.
I did not quite understand it. Has any tried this?
Web browsers are deliberately isolated from the filesystem for security reasons. Only Java (not "Java Script"), Flash or browser plug-ins can accomplish this.
JavaScript cannot directly access your local disk (including a flash drive) for security reasons (would you really want any web site you look at to access, change, or even delete your files?), and ActiveX controls are IE-specific, so you should probably use a Java applet (not JavaScript). While Java's security policy normally does not allow access to local disks, signed applets can with the user's permission.
If you're willing to introduce a dependency on Flash (10), you can use the FileReference class to get access to one file at a time, first for reading using the browse method, then for writing using the save method.
Note that for security reasons, each call to these methods must be triggered as a result of user input (e.g. clicking a button), and each time they are called an OS-specific File Open/Save As dialog box is displayed.
There's a video tutorial which gives some sample code for editing a text file (load + save) directly in Flash, without needing any server-side help. It should be enough to get you started in the right direction.
What about WPF in browser mode...I read that I can host my wpf apps inside browser and sort of like smart client.

Web browsers interacting with desktop?

What languages/techniques are used for letting the web browser interact with the desktop, e.g. dragging files to the web browser, dragging files from web browser to desktop, and maybe more features that I'm not aware of.
I think flash and silverlight allows you to do that but I'm not sure.
Does javascript do this?
It depends on what you mean by "interact". Browsers can't really interact with the desktop except for choosing files to upload or choosing places to download files. There's a good reason for that.
ActiveX controls on Windows permitted IE to interact with the desktop, which turned out to be a gigantic security nightmare. Even Microsoft has backed off of that approach now.
If you want to interact with the user's computer, you should try AIR, which is an executable application outside of the browser.

Categories

Resources