I was trying to launch a putty.exe
file through HTML locally only. I have made an HTML page which has list of environments and when you click on a particular environment it opens up the session in putty. I was able to achieve this through an ActiveX object, but it works only in IE. I am trying to make it cross- browser compatible so that it can run on either Chrome or Firefox also. My HTML page looks like this :
<html>
<head>
<script>
function LaunchApp(envName) {
var env = envName
var oshell = new ActiveXObject("WScript.Shell");
var commandtoRun = "C:\\putty.exe "+env;
oshell.Exec(commandtoRun);
}
</script>
</head>
<body>
<h1>Run a Program</h1>
This script launch the file any Exe File<p>
<!--
<button onclick="LaunchApp('gsamqaauth.sapient.com')">Run Exe File</button>
-->
<a href="#" onclick="LaunchApp('enviornment')">environment</a>
</body>
</html>