Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Here is my code

XML
<script type="text/javascript" lang="javascript">
            function TestRun() {
                var RunFile = new ActiveXObject("WScript.Shell");
                RunFile.ShellExecute("c:/windows/system32/notepad.exe", 1, false);
            }
    </script>


<input id="btnScan" type="button" value="Scan" onclick="TestRun();" />


Thanks in advance
Posted

1 solution

No.
Why not? Because if you could do it, so could malicious sites. And that's why ActiveX now defaults to OFF and nobody installs them - because they were used for malicious purposes.

You want to run NotePad: that guy over there wants to run FDISK...
 
Share this answer
 
Comments
Kochathu Thomas Tinu 27-Nov-14 6:45am    
Thanks for ur response. Actually i need to run scanner. First am testing with the Notepad. Kindly give a solution.
OriginalGriff 27-Nov-14 7:27am    
What part of "No" do you not understand?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900