Can you access the windows registry from Adobe Air

2019-03-20 06:12发布

(y/N)

Edit: Read-only access is fine.

8条回答
时光不老,我们不散
2楼-- · 2019-03-20 06:45

Here is a sample of modifying Windows Registry in Adobe Air using NativeProcess and Python. So you can Add, Delete or Read keys by only a single line of code !!

Download: Adobe Air Registry Modifier on Github

查看更多
女痞
3楼-- · 2019-03-20 06:50

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

查看更多
登录 后发表回答