How to execute an exe using Javascript?
- by Karthick
I need to open an EXE from a folder, when the folder is present, using javascript. I have added the code, but am not able to open the EXE after checking the folder, please share your thoughts.
<html>
<body>
<script language="JScript">
<!--
function checkfolder()
{
var myObject;
myObject = new ActiveXObject("Scripting.FileSystemObject");
if(myObject.FolderExists("\\tmp"))
{
alert("tmp Folder Exists");
}
else
{
alert("tmp Folder doesn't exist");
}
}
-->
</script>
Check for folder "tmp"
<form name="myForm">
<input type="Button" value="Check Folder" onClick='checkfolder()'>
</form>
</body>
</html>