Hello, I cannot run this code via javasciprt on my asp.net page:-
<html>
<head>
<script language="javascript" type="text/javascript">
function MyFunction()
{
var oShell = new ActiveXObject("WScript.shell");
var prog="c:\dev\ca.exe parameter";
oShell.Run(prog, 1);
}
</script>
</head>
<body>
Hello, <a id="myLink" title="Click to do something" href="#" onclick="MyFunction();return false;">link text</a>
</body>
</html>
While I can run the following code that calls the same app but using cmd first:-
<script language="javascript">
function ShowAlert()
{
var oShell = new ActiveXObject("WScript.shell");
oShell.Run("cmd /c c:\\dev\\ca.exe parameters", 1);
}
</script>
Why is this happening? I had to turn initialize activex obj to ENabl ...
Go to the complete details ...