I cannot see any problems with your code. I however would like to see you check to see if the file exists before trying to execute it. So something like...

Code:
  
function exectest()
{
var file_handle = file_open_read("KleinesEinmaleins.exe");

if (file_handle != 0) // if the file exists
{
exec("KleinesEinmaleins.exe", ""); // A simple C console application
}
else
{
beep();
}
}



The application will beep if the file isn't found.