1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<html><head>
<HTA:Application id="AppExecute"
ApplicationName="AppExecute"
WindowState="maximize">
<style>
.class0 {background-color:lightblue;color:darkblue;}
</style>
<script language="JavaScript"><!--
function AppExecute(app) {
var wshShell = new ActiveXObject("WScript.Shell");
wshShell.Run(app+".exe", 1, true);
}
--></script></head>
<body>
<font size=2>Free JavaScript provided by ©2003-VB'Breizh :<a href="http://gilles.saunier.free.fr"> Web Site</a><br>Adapted from Avner Cohen
and <a href='www.hyperwrite.com'>HyperWrite</a></center>
<hr><font color=red><font size=3>
Works only with IE.501 and more recent.
<br><font size=2><font color=darkgreen>
Just save your .html file as a .hta file and it should run via the HTML application host.<br>
This script works with a MS proprietary format (.hta extension = executable .html).<br>
Internet Explorer will display the File Download dialog
box before the *.hta is opened as a security measure. <p>
<input type="button" value="Notepad" onclick="AppExecute('notepad')">
<input type="button" value="Calculator" onclick="AppExecute('calc')">
<input type="button" value="Explorer" onclick="AppExecute('explorer')"><br>
</form></center>
</body></html> |