Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-10-07
2
Medium Priority
?
1,620 Views
Last Modified: 2013-11-19
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

0
Comment
Question by:Waterstone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
AdiF earned 2000 total points
ID: 22665061
I would check the folder permissions.  I believe that the "Program Files" folder usually has more restrictions by default, than other normal folders on the hard drive.

Please also try incorporating the escape() JavaScript function to the filename variable:

runnerwin.document.write(strpagestart + ecape(filename) +  strpageend);

This will encode it to be URL-friendly in case your file path translates to something else because of all the special characters.
0
 

Author Comment

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question