Click here to Skip to main content
14,265,748 members
Rate this:
Please Sign up or sign in to vote.
See more:
Here is my code

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

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

Thanks in advance

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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...
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100