View Full Version : Opening Programs From Internet Explorer

04-27-2004, 10:17 AM
:confused: Is there anyway that you can bypass the security screen attached to this message!? :confused:
I am trying to create a small Intranet system and from this I need to open certain applications such as the Microsoft Office Programs, but Internet Explorer keeps coming up with this message no matter what I try as it is an *.exe file. I have tried creating a shortcut to the exe file but it brings up the same box! :mad:
Any ideas!?

04-27-2004, 11:09 AM
Use Explorer to associate .abc with your program ABC. Then send a .abc file to the user through the browser and your ABC program will start.

Willy Duitt
04-27-2004, 11:10 AM
Try this:

<script type="text/javascript">
var launch = new ActiveXObject('Shell.Application');

<a href="javascript&#58;launch.ShellExecute('wkswp.exe', '', 'C:\\Program Files\\Microsoft Works');">Microsoft Word</a><br>
in: "C:\Program Files\Microsoft Works\"


04-27-2004, 11:19 AM
Do you want to open Word documents?

<a href="myfile.doc">Open myfile.doc</a>

That will open the document in MS Word that is merged inside IE window.

04-27-2004, 12:40 PM
using HTAs for intranets (providing it is Win only) will get over security issues.

04-27-2004, 07:16 PM
If you're using IE, you can go to Tools->Internet Options->Security and I think you can configure the sites on your local intranet to have ActiveX security on Low or disabled. You can do that for all the computers on your intranet that will use your system.

Now you have plenty of options! Hopefully one of them works out for you.

Good luck,

04-27-2004, 08:52 PM
Well, just to add another option to the list, components of the "Microsoft Internet Controls" library are insertable; namely, the ShellNameSpace object (a.k.a. the Favorites menu)--which can be scripted to load your own custom directory of shortcuts, etc.

04-28-2004, 12:09 PM
how do you mean, swmr?

04-28-2004, 12:35 PM
:thumbsup: Thanks Guys!! :thumbsup:
I used theShellExecute Script!! It works well on the single HTML page, but where I am using frames it gets a bit messed up and gives errors!
To use the script with frames it Opens the target as "_Parent"
Cheers Again!

05-01-2004, 10:42 AM
how do you mean, swmr?

The ShellNameSpace object has:

1. a classid, which can be used with the <object> tag to insert the favorites tree menu within a document.

2. a method "SetRoot" for setting a root folder for the menu.

3. an event "FavoritesSelectionChange" with a parameter "cVisits" that returns a string.
If the current menu selection is an Internet Shortcut (.url file), the url is returned; if the selection is another file type, such as a Shortcut (.lnk file), the path to the file itself (or a folder) is returned.

4. a method "InvokeContextMenuCommand" which invokes a verb on the selected file.

So, when the FavoritesSelectionChange event occurs, one can use an expression on the string (cVisits) to determine what to do with the menu item.
For example, if the extension is IE-compatible, it can be opened in an iframe; if the extension is .lnk, using InvokeContextMenuCommand("open") will launch the shortcut in its associated application.

Although, scripting the object will result in an ActiveX-warning dialog, unless used in an HTA.