Link to home
Start Free TrialLog in
Avatar of Waterstone
Waterstone

asked on

IFrame & Internet Code Download linking to execute an exe works in one folder, not another

We ned to execute a custome exe from within IE on our Intranet.  I'm working with the sampke code from http://support.microsoft.com/?id=232077
The program is not digitally signed yet, but will be if we can provve that the method will work for us.
I place this html file and the program MyProgram.exe in two folders.  It works if it is in
C:\MyTest
But not if it is in.
C:\Program Files\Microsoft Visual Studio 8\VC#\CSharpProjects\MyProject
We need it to work no matter where it sits.
The script generates exactly the same code for the Iframe in either folder.
Any idea what I'm missing here?

Thanks


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test 3</title>
</head>
<body>
<SCRIPT>
// linkit puts filename into HTML content and spews it into iframe
function linkit(filename)
{
   strpagestart = "<HTML><HEAD></HEAD><BODY><OBJECT CLASSID=" +
      "'CLSID:15589FA1-C456-11CE-BF01-00AA0055595A' CODEBASE='";
   strpageend = "'></OBJECT></BODY></HTML>";
   runnerwin.document.open();
   alert('This is the IFrame code generated by this page: ' + strpagestart + filename  +  strpageend);
   runnerwin.document.write(strpagestart + filename  +  strpageend);
   
   window.status = "Done.";
   return false;  // stop hyperlink and stay on this page
}
</SCRIPT>
<br />
===============================
<BR/>
<!-- hyperlink uses central script function called linkit() -->
<p>This link requires that we Sign the exe.  Without signing you will get the yellow warning bar at the top of the browser window.  Click on the yellow warning bar and click Allow to test this code.  If we can sign the exe this code should work for us without the warning.</p>
<p>
<A HREF="" onclick="return linkit('MyProgram.exe');">
Open Isys</A>
</p>
<!-- hidden iframe used for inserting html content -->
<IFRAME ID=runnerwin WIDTH=0 HEIGHT=0 SRC="about:blank"></IFRAME><BR/>
 
</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of AdiF
AdiF

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Waterstone
Waterstone

ASKER

Thanks.  It is, of course, a permissions issue.  We've moved it and it works well.  Now need to reasearch digitall signing the exe.