Adobe AIR - 列出已安装的应用程序

发布于 2024-08-21 23:39:24 字数 108 浏览 6 评论 0原文

是否可以获取已安装的 AIR 应用程序列表(可选)仅由一个供应商提供?

或者,是否可以检查是否安装了一个应用程序(通过名称/某个 ID/供应商检查)(首选此方法)

谢谢。

Is it possible to get list of installed AIR applications, optionally only by one vendor?

Or, is it possible to check, whether is one application (checked by name/some id/vendor) installed (this method would be preferred)

Thank you.

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

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

发布评论

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

评论(3

分开我的手 2024-08-28 23:39:24

你可以这样做:

        private function loadAIR():void
        {
            var loader:Loader = new Loader();
            var loaderContext:LoaderContext = new LoaderContext();
            loaderContext.applicationDomain = ApplicationDomain.currentDomain;
            loader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
            loader.load(new URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"), loaderContext);
        }

        private function onInit(e:Event):void
        {
            var air:Object = e.target.content;
            try
            {
              air.getApplicationVersion("appID", "publisherID", versionDetectCallback);
            }
            catch (e:Error)
            {
              trace('air not installed');
            }
        }

        private function versionDetectCallback(version:String):void
        {
            if (version == null)
            {
                trace('app not installed');
            }
            else
            {
                trace('app version ' + version + ' installed');
            }
        }

You can do this:

        private function loadAIR():void
        {
            var loader:Loader = new Loader();
            var loaderContext:LoaderContext = new LoaderContext();
            loaderContext.applicationDomain = ApplicationDomain.currentDomain;
            loader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
            loader.load(new URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"), loaderContext);
        }

        private function onInit(e:Event):void
        {
            var air:Object = e.target.content;
            try
            {
              air.getApplicationVersion("appID", "publisherID", versionDetectCallback);
            }
            catch (e:Error)
            {
              trace('air not installed');
            }
        }

        private function versionDetectCallback(version:String):void
        {
            if (version == null)
            {
                trace('app not installed');
            }
            else
            {
                trace('app version ' + version + ' installed');
            }
        }
妞丶爷亲个 2024-08-28 23:39:24

这是一个有趣的问题。我认为 Adob​​e 在客户端计算机上没有任何位置存储计算机上安装的 AIR 应用程序列表,但您也许可以通过 airdownload

另一个不错的选择是使用 Adobe AIR 2.0 的命令行集成功能。有了它,您可以编写一个依赖于操作系统但相当简单的脚本(shell、ruby、python 等),该脚本按名称递归检查某些目录中的 .AIR 文件,如果没有找到它们,您的启动应用程序可能会说“抱歉,我们没有找到这两个应用程序:X 和 Y。请指定它们的位置或在此处下载”。在他们指定安装路径后,您可以推断他们可能安装了其他 AIR 应用程序。

或者,您可以在其主目录中安装一个文本文件,其中包含已安装的 AIR 应用程序列表,并阅读该文件以了解下一步应采取的步骤。那可能会更容易。

希望有帮助,

This is an interesting question. I don't think there are any places on the client's computer where Adobe is storing a list of AIR apps installed on the computer, but you may be able to find it via airdownload.

Another decent alternative would be to use Adobe AIR 2.0's Command Line Integration feature. With that you could write an OS-dependent, yet fairly simple, script (shell, ruby, python, etc.) that recursively checked some directories for .AIR files by name, and if they weren't found, your startup app could say "Sorry we haven't found these two apps: X and Y. Please either specify their location or download them here". And after they specified the install path, you could infer where they might have other AIR apps installed.

Or you could install a text file in their home directory with a list of the AIR apps you have installed and read that to figure out what steps you should take next. That would probably be easier.

Hope that helps,
Lance

梅窗月明清似水 2024-08-28 23:39:24

如果您知道 appID 和publisherID,adobe.utils.ProductManager 可能对您有一些神奇的东西...但是productManager 是一个文档记录很差的类,我猜我的建议是一个死胡同。我用它做过一次,我记得,由于包位置的原因,我没有获得任何代码洞察力,这是一个非常反复试验的过程。

If you know the appID and the publisherID, adobe.utils.ProductManager might have something magical for you... but productManager is such a poorly documented class that I'm going to guess that my suggestion is a dead-end. I used it once for something and as I recall, because of the package location, I didn't get any code insight and it was a very trial-and-error process.

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