Can you access the windows registry from Adobe Air?

前端 未结 8 1438
萌比男神i
萌比男神i 2021-02-09 00:55

(y/N)

Edit: Read-only access is fine.

8条回答
  •  天涯浪人
    2021-02-09 01:13

    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

提交回复
热议问题