开发者

Link to an MSI file from Flash

I'm trying to work on a CD catelog, and there are about 4 buttons where the user has to be able to download separate things (the catelog itself, internet explorer, firefox, chrome, and adobe reader). I saw on the old catelog that whomever made the disc created an .msi file that has the catelog. I'm re-creating the main CD index (that has all the links on it) with Flash Pro cs5 (using action script 3.0) but I've never really dealt with .msi files or downloads before. I looked up creating .msi files and it looks somewhat easy since theres a program for it, but is it even possible to link to that type of file? I tried to create a link to one using the same code you would for a PDF:

this_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);

function fl_MouseClickHandler(event:MouseEvent):void
{
navigateToURL(new URLRequest('filename'));
}

and replaced 'filename' with the .msi file's name but it didnt seem to work. Actually the button just wasnt working at all. I have that code in another button that opens a PDF and that works fine. Anyways is there a simpler way to go about making a 'download this' button that will work? Anyways then I tried this set of code (which also isnt working):

instal_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);

function fl_MouseClickHandler_4(event:MouseEvent):void
{
    fscommand("exec","RogoCDCat.msi");
}

Also I suppose as a side question, where would I get the files needed to 开发者_高级运维create a working download button for the browsers (ie, ff, google etc), or is that available on each browsers main site?

Thanks for your time!


but is it even possible to link to that type of file?

Yes, you can link to MSI files. Just user their exact URL.

and replaced 'filename' with the .msi file's name but it didnt seem to work

Make sure the MSI is at the URL you specified. Also, the URL should work when used directly in Internet Explorer. If it doesn't, then the URL is incorrect or the MSI is not there.

Also, make sure that your server MIME types allow MSI files to be downloaded instead of opened.

where would I get the files needed to create a working download button for the browsers (ie, ff, google etc), or is that available on each browsers main site?

I don't think that you can redistribute them, so most likely you will need to link to them directly. For example: http://download.mozilla.org/?product=firefox-5.0.1&os=win&lang=en-US


You probably can't just call the MSI directly, you will need to call MSIEXEC with the MSI as a parameter:

msiexec.exe /i filename.msi

Regarding the dependent applications, you will need to check the licensing for each application individually. With Adobe for example, you're prohibited from redistributing Adobe product unless you have a distribution agreement. It's a fairly straightforward process and you just have to fill out a form online - https://www.adobe.com/cfusion/mmform/index.cfm?name=distribution_form

For the browsers, check with each manufacturer. You will generally have to agree to certain terms before being allowed but again it's a fairly straightforward process - they just need to cover themselves legally (and so should you!)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜