从 Flash 链接到 MSI 文件

发布于 2024-11-26 06:01:18 字数 907 浏览 2 评论 0原文

我正在尝试处理 CD 目录,大约有 4 个按钮,用户必须能够下载单独的内容(目录本身、Internet Explorer、Firefox、Chrome 和 adobe reader)。我在旧目录中看到,制作光盘的人都会创建一个包含目录的 .msi 文件。我正在使用 Flash Pro cs5(使用动作脚本 3.0)重新创建主 CD 索引(其中包含所有链接),但我以前从未真正处理过 .msi 文件或下载。我查找了创建 .msi 文件,它看起来有点简单,因为有一个程序,但是否有可能链接到该类型的文件?我尝试使用与 PDF 相同的代码创建一个链接:

this_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);

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

并将“文件名”替换为 .msi 文件名,但似乎不起作用。事实上,这个按钮根本不起作用。我在另一个打开 PDF 的按钮中有该代码,效果很好。无论如何,有没有一种更简单的方法来制作一个可以使用的“下载这个”按钮?无论如何,然后我尝试了这组代码(也不起作用):

instal_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);

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

另外我想作为一个附带问题,我从哪里可以获得为浏览器(即 ff、google 等)创建工作下载按钮所需的文件,或者是每个浏览器主站点上都有哪些可用的?

感谢您抽出时间!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一曲爱恨情仇 2024-12-03 06:01:18

但是是否有可能链接到该类型的文件?

是的,您可以链接到 MSI 文件。只需使用他们的确切 URL 即可。

并将“文件名”替换为 .msi 文件名,但似乎没有
工作

确保 MSI 位于您指定的 URL 处。此外,直接在 Internet Explorer 中使用该 URL 应该可以工作。如果没有,则 URL 不正确或 MSI 不存在。

另外,请确保您的服务器 MIME 类型允许下载而不是打开 MSI 文件。

我从哪里可以获得创建有效下载按钮所需的文件
对于浏览器(即 ff、google 等),或者在每个浏览器上都可用
浏览器主站点?

我认为您无法重新分发它们,因此很可能您需要直接链接到它们。例如: http://download.mozilla .org/?product=firefox-5.0.1&os=win&lang=en-US

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

浮光之海 2024-12-03 06:01:18

您可能不能直接调用 MSI,您需要使用 MSI 作为参数来调用 MSIEXEC:

msiexec.exe /i filename.msi

对于依赖的应用程序,您需要单独检查每个应用程序的许可。以 Adob​​e 为例,除非您有分发协议,否则您不得重新分发 Adob​​e 产品。这是一个相当简单的过程,您只需在线填写一份表格 - https ://www.adobe.com/cfusion/mmform/index.cfm?name=distribution_form

对于浏览器,请咨询各个制造商。在获得允许之前,您通常必须同意某些条款,但这又是一个相当简单的过程 - 他们只需要合法地保护自己(您也应该如此!)

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!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文