Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Website Design/Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=64)
-   -   Launch Applications with HTML? (http://www.chiefdelphi.com/forums/showthread.php?t=25344)

Aignam 15-02-2004 17:00

Launch Applications with HTML?
 
Is there any way I can use HTML to launch a Windows application, perhaps through a link? A Google-search revealed no seemingly useful results. Can anyone help with this one?

Joe Ross 15-02-2004 17:33

Re: Launch Applications with HTML?
 
Depends on what you mean. It would a *huge* security hole if one could launch any program at any time. Imagine if the website launched "del c:\*.*".

However, if you are downloading a file, the web browser can open up an application to view the file based on extension or MIME type.

I also beleive that a java or activeX appliction can launch another application, but you would be required to lower the security settings of your browser.

There are also a few security holes in IE that could be used to do this.

Roland 15-02-2004 17:51

Re: Launch Applications with HTML?
 
As a user, I think that'd be one of the most annoying things ever. What are you trying to do, anyway? Also think of everyone out there on Mac OS, Linux, etc. You won't score big interoperabilty points there.

David66 15-02-2004 18:20

Re: Launch Applications with HTML?
 
i have thois thought that you are trying something with fancy video...dont do it....if it cant use plug-ins and requires ana ctual application to open its annoying...trust me

Ryan M. 15-02-2004 19:18

Re: Launch Applications with HTML?
 
Quote:

Originally Posted by Aignam
Is there any way I can use HTML to launch a Windows application, perhaps through a link? A Google-search revealed no seemingly useful results. Can anyone help with this one?

What exactly do you want to do?

Find out what he's thinking before you bash him, guys. :)

Aignam 15-02-2004 20:33

Re: Launch Applications with HTML?
 
It was actually nothing FIRST related (for once). I was making an Intranet page for my home network and thought it's be cool to be able to launch commmonly used programs from a small navigation bar. ::shrugs:: Sorry if I offended any of you with a simple question..

Roland 15-02-2004 21:00

Re: Launch Applications with HTML?
 
I wasn't offended. I just thought that this wouldn't go over very well in the context of a robotics team site.

Aignam 15-02-2004 21:12

Re: Launch Applications with HTML?
 
Quote:

Originally Posted by Roland
I wasn't offended. I just thought that this wouldn't go over very well in the context of a robotics team site.

This particular sub-forum is not only for you to " Show off your team's website", but also to "Ask for help with HTML, PHP, CSS, XML, and other website related topics". Please don't make any unnecessary and, in this case, wrong, assumptions. That's not good posting ettiquette. Next time I will make it a point to be more specific, though. So there, a lesson learned for all of us.

Anywho, does anyone have a solution to this problem? Is it possible?

Greg 15-02-2004 21:55

Re: Launch Applications with HTML?
 
Here's a way of doing this with IE and javascript:
PHP Code:

<HTML>
<
HEAD>
<
SCRIPT type="text/javascript" LANGUAGE="JavaScript">
  function 
executeCommands()
   {
  
// Instantiate the Shell object and invoke its execute method.
    
var oShell = new ActiveXObject("Shell.Application");
    var 
commandtoRun "C:\\Windows\\Notepad.exe";
 
// Invoke the execute method.  
     
oShell.ShellExecute(commandtoRun""
   
"""open""1");
  }
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<Input type="Button" name="cmdNote" 
   value="Run Notepad" onClick="executeCommands();"  />
</CENTER>
</BODY>
</HTML> 

Once you save this as an HTML file and open it in IE, you can run Notepad by clicking the button. A security warning should pop up. If you want to get rid of it, modify security settings for the Local Intranet zone to allow "opening programs in an IFRAME". Be very careful when doing this. There are known (and unknown yet :)) bugs in IE that could allow an internet page to appear as if it is on the intranet. Check what security zone Outlook is in too if you use it (it should be in Internet by default, but check anyway :)) Well, you have been warned :D

You can use this technique to open any file (it does not have to be executable). And there are similar techniques for interacting with Word, Excel, etc. And by the way, I found this script on this page originally: http://www.midrangeserver.com/mpo/mp...2-story01.html

Elgin Clock 15-02-2004 22:39

Re: Launch Applications with HTML?
 
Speaking of...

Does anyone know the specific code you use to launch mpeg, or avi files in your local player from a website??

Greg 15-02-2004 22:47

Re: Launch Applications with HTML?
 
Just put a link to the movie in in an EMBED or OBJECT (this one is better) tag. It should work in any browser, especially if you nest the tags (put EMBED inside OBJECT, just like Flash files). A better idea is to simply provide a link to the file. Movies take time to download, so its better to make it up to the user to decide. By the way, you can put video in Flash files (Flash MX and up). The compression is excellent, and everyone has the plugin. You can easily convert your mpegs to flash.

Elgin Clock 15-02-2004 22:50

Re: Launch Applications with HTML?
 
I hate the embed tag!!! It takes forever to load the page then with an embedded video file.

That is why I want to link it somehow and let it open externally in your local media player.

deltacoder1020 16-02-2004 00:10

Re: Launch Applications with HTML?
 
then just put a link to the file - if the user has a player for that type of file, it should launch automatically (the user may have to click the "Open" button on a dialog box, but that's unavoidable).

zeep25 16-02-2004 12:09

Re: Launch Applications with HTML?
 
to make a video/audio open in a default program ... just make the link target to like "_new" or something ... it'll open a new ie window and then it should automatically launch the program like windows media players if u linked a .wmv etc file ... :D

deltacoder1020 16-02-2004 12:49

Re: Launch Applications with HTML?
 
just link to it - not all applications play the video inline with the browser, so you'd end up just giving a useless extra blank window to some users.


All times are GMT -5. The time now is 15:24.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi