Tutorial :Can I make the download dialog box appear without “save” option?



Question:

I have a hyperlink to an executable like so: <a href="xxx.exe"> Run Now </a> I'm trying to make the download dialog box appear without the save function as it is to only run only on the user's computer.

Is there any way to manipulate the file download dialog box?

FYI: Running on Windows Server '03' - IIS. Please no suggestions for a WCF program.


Solution:1

Okay I found it for anyone stumbling upon this conundrum in the future. Add the following tag to your head section: <meta name="DownloadOptions" content="nosave" /> and the file download dialog box will not display the "save" option.

For the user to not open/run but save replace "nosave" with "noopen"


Solution:2

Not unless you have some control over a user's machine. If your application can run on limited resources, you might want to consider doing it in Silverlight.


Solution:3

IMO, having a website launching an executable is a pretty bad idea.... even worst if that website is open to the general public (not on intranet). I don't know what that app is doing but it sure is NOT, 1) cross browser, 2) cross platform, and 3) safe for your users.

If you are on intranet, you might get away with giving the full server path (on a shared drive) to the executable and change security settings on your in-house machines.

Other than that, you won't succeed in a open environment such as the Internet.


Solution:4

From your comments, if the user downloading the file is the issue, then there's no way to get around it, as they have to download the file in order to be able to run it.

There's any number of ways to get around whatever you could manage in browser, from proxies like Fiddler intercepting the data, or lower level things like packet sniffing. Or even simply going into the browser's temp/cache folder and copying the file out once it's running.

You could probably get around most laymen by having a program that they can download that registers a file extension with Windows. Then the file downloaded from this site would have the URL of the actual data obfuscated somehow (crypto/encoding/ROT-13/etc). The app would then go and grab the file. The initial program could even have whatever functionality provided by what you want to download, but it needs the downloaded key.

But this is moving into the area of DRM and security by obscurity. If an attacker wants your file, and it's on the Internet, they will get the file.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »