Reputation: 31
Instead of ActiveXobject what i have to use for Chrome or FF. Below code is not working on Chrome and FF. i am getting the below error "Uncaught ReferenceError: ActiveXObject is not defined".
<!DOCTYPE html>
<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 ActiveXObject("WScript.Shell");
WshShell.Run("c:/vlc-2.2.4-win64.exe", 1, false);
}
</script>
</head>
<body>
<input type="button" value="Run Notepad" onclick="RunFile();"/>
</body>
</html>
Upvotes: 1
Views: 763
Reputation: 944532
There is no cross-browser way to trigger the execution of applications on the user's system from an HTML document.
Upvotes: 1