0

I am trying to open a file from Firefox or Chrome browser. I have written the following code and it is successfully opening Notepad from Internet Explorer. Kindly tell me how to write this code if i want to open an Application from Firefox or Chrome Browser.

<html> <head> <title>Application Executer</title> <HTA:APPLICATION ID="oMyApp" APPLICATIONNAME="Application Executer" BORDER="no" CAPTION="no" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" SCROLL="no" WINDOWSTATE="normal"> <script type="text/javascript" language="javascript"> function RunFile() { //WshShell= new XMLHttpRequest("WScript.Shell"); //WshShell.Run("c:/windows/system32/notepad.exe", 1, false); WshShell = new ActiveXObject("WScript.Shell"); WshShell.Run("c:/windows/system32/notepad.exe", 1, false); } </script> </head> <body> <input type="button" value="Run Notepad" onclick="RunFile();"/> </body> </html> 
2

2 Answers 2

1

because of security issues it's not possible.it's work just for notepad and trusted program.now a days google chrome just allow to google's plugin to be install on Chrome.so user should first download file and then run it.such this code that u want to write,easily can hack or format user's disk.

Sign up to request clarification or add additional context in comments.

1 Comment

It is possible to launch an .exe from a web page if you register a custom URL protocol for it.
0

for complete above answare( reza jafari answer ) i should say that,have u ever seen any web site that open .exe file on u'r computer?absolutly no.so it's not possible because of scurity

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.