您可以从 Adob​​e Air 访问 Windows 注册表吗? [英] Can you access the windows registry from Adobe Air?

查看:32
本文介绍了您可以从 Adob​​e Air 访问 Windows 注册表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(是/否)

只读访问很好.

解决方案

我还没有尝试过这个,但我想我已经找到了一个解决方法.

Adobe AIR 无法写入 Windows 注册表,但您可以在 AIR 2 中启动本机进程.这是一篇介绍如何执行此操作的博客文章:http://www.adobe.com/devnet/air/flex/quickstart/articles/interacting_with_native_process.html>

现在,在 Windows 上,您可以使用 .reg 文件修改 Windows 注册表..reg 文件只是由 regedit.exe 读取的纯文本文件.所以理论上,您可以将.reg 文件写入文件系统,然后使用传入的.reg 文件启动regedit.exe 和...TADA!您刚刚从 AIR 应用程序修改了 Windows 注册表!

要读取值,可以使用 regedit 的导出功能写入 reg 文件并从 reg 文件中读取.regedit 选项的详细信息:http://www.robvanderwoude.com/regedit.php

这里有一些额外的资源:
.reg 文件语法:http://support.microsoft.com/kb/310516
使用 AIR 写入文件:http://www.adobe.com/devnet/air/flex/articles/exploring_file_capabilities.html

(y/N)

Edit: Read-only access is fine.

解决方案

I haven't tried this yet, but I think I've found a workaround.

Adobe AIR cannot write to Windows Registry, but you can, however, launch a native process in AIR 2. Here's a blog post that shows how to do that: http://www.adobe.com/devnet/air/flex/quickstart/articles/interacting_with_native_process.html

Now, on Windows, you are able to modify the Windows registry with .reg files. .reg files are just plain text files that's read by regedit.exe. So in theory, you can write a .reg file to the file system, then launch regedit.exe with the .reg file passed in and...TADA! You just modified Windows registry from your AIR app!

To read value, you can use regedit's export function to write to a reg file and read from the reg file. Details to regedit's options: http://www.robvanderwoude.com/regedit.php

Here are some additional resources:
.reg file syntax: http://support.microsoft.com/kb/310516
write to file with AIR: http://www.adobe.com/devnet/air/flex/articles/exploring_file_capabilities.html

这篇关于您可以从 Adob​​e Air 访问 Windows 注册表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆