I gues that I should add that I've tried various forms of exec() system(), etc as follows.
calc.php
<?
//exec('cmd bgrun.exe calc.bat ');
//exec("COMMAND.COM /C calc.exe >NUL");
//exec("mikehup calc.exe");
exec("calc.bat"); //worked for me.
//$cmd = "c:\calc.bat";
//exec( $cmd );
//passthru("c:\command.com /c calc.bat" );
//exec("c:\command.com /c calc.bat");
echo "testing.."; //shows that the script comes back.
?>
calc.bat
<
bgrun.exe calc.exe //bgrun is a file that I found along the vien of mikehup...it is supposed to clode stdout, etc, and pass control back to the php script without waiting for the command to finish.
turns out that this solution is SERVER-SIDE DOPE!. I needed a CLIENT-SIDE solution, well back to the drawing board.
Soo, I found this next,
calcii.php
<html>
<head>
<script language="JScript">
function ShellExJ(filename,arg,count)
{
var objShell = new ActiveXObject("Shell.Application");
objShell.ShellExecute(filename, arg, "", "open", count);
}
</script>
<script language="VBScript">
function fnShellExecuteVB()
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "notepad.exe", "", "", "open", 1
set objShell = nothing
end function
</script>
</head>
<body>
<a target="self" href="javascript:ShellExJ('C:\calc.exe');">Spider</a>
<a onClick=" ShellExJ('C:\calc.exe'); return false;" href="javascript:;">Spider</a>
<a target="self" href="vbscript:fnShellExecuteVB('C:\calc.bat');">Spider</a>
</body>
</html>
This sometimes worked, but on some machines it gave a permission denied error as well., it's then that I stumbled my way to the example shown in the first post.
\hmm did I leave anything out?