Jump to content
Sign in to follow this  

Html Executable Links

Recommended Posts


I'm not sure whether this belongs in the regular AutoIt forum or the GUI forum, so I'll take a stab at it and place it in the regular forum.

There are many GOOD freeware html menu makers out there, some of them surprisingly so. An html based menu can execute or open quite a variety of programs and documents. What I am wanting to do is build a menu for a CD-Rom based service disc (You know the type. Pack it with useful utilities, diagnostics, etc.) It makes service calls easier and faster for both me and the customer. The problem is that HTML files do not execute 'exe' files per se. It will ask you if you want to save it to disk. I DO understand the security reasoning behind this. I don't like virus or malware writers any more than than most people. For a CD-Rom based service application, however, I can't see what the issue would be. Now the question: How can I, while in an html document (run from a CD-Rom) click on a link and open an executable file, for example an '.EXE'? Even a command shell implementation would be acceptable.

Share this post

Link to post
Share on other sites

In a pinch, I suppose you could pre-launch an AutoIt script that watches for your menu to open Javascript alert() boxes. Depending on the content of those boxes, the AutoIt script could then launch the appropriate EXE or even take other actions.

Share this post

Link to post
Share on other sites

For this to work (i.e. for links to "file:C:\blah.exe" to work), you need to pay close attention the "Internet Zone" that the page believes it is in (take a look at the lower right corner of your IE browser -- it should say "Internet" right now). To get it to execute local commands based on file associations it needs to be started from your local file system and the internet zone needs to show up as "My Computer".

If it IS on your local filesystem and it still shows something other than "My Computer", right click on the file in the file explorer and check it's preperties -- if there is an "Unblock" button there and the bottom of the property sheet it means that the file was at one point downloaded from the internet... click the unblock button and it should now show up in the "My Computer" internet zone.

There is one more area to look at in IE... in the Tools -> Internet Options... -> Advanced tab there are options for "Allow active content to be executed on" where you'll find options for both My Computer and CDROM. If you enable these you can avoid the IE security bar that forces you to "allow blocked content".

I'm doing some work in this area right now myself, so if you learn anything interesting please post back.


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.