Program Execution
I am not sure if anyone else has brought this up since I haven't read through the whole thread, but an alternate and perhaps easier way to execute programs through html is to use the inbuilt ShellExecute function. This way you hopefully shouldn't have any problems with long or short filenames and whatnot when using Shell.
There are two ways to do it, no need to use both of course but you can integrate it into whatever scripting language you are using most.
I used GordianKnot as an example
<html>
<head>
<title>Prog Launcher</title>
</head>
<script language="JScript">
function ShellExJ(filename)
{
var objShell = new ActiveXObject("Shell.Application");
objShell.ShellExecute(filename, "", "", "open", 1);
}
</script>
<script language="VBScript">
function ShellExVB(filename)
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute filename, "", "", "open", 1
set objShell = nothing
end function
</script>
<body>
<a onClick="ShellExJ('D:\\Apps\\GordianKnot\\GordianKnot.exe')" href="javascript:;">GKnot Java Exec</a><br>
<a onClick="ShellExVB('D:\\Apps\\GordianKnot\\GordianKnot.exe')" href="javascript:;">GKnot VB Exec</a>
</body>
</html>
This works fine for me and saves the hassle of creating vbscripts for every program as you can simply pass the filename variable to the script. Also might make things a little faster but i haven't really tested it.
More info on the method is available from MSDN here -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/ishelldispatch2/shellexecute.asp
Hope this helps some of you
EDIT: Keep in mind the above code can be used not only to launch exe but jpg, text and other files - it will simply load any file up in its default viewer/program.