Add Delete Modify registry keys with Flash

Posted on 2010-01-07
Last Modified: 2012-05-08

It appears that flash cannot directly add, delete, or modify registry keys.  However, perhaps a different creative approach would work.

We are developing a VB6 app that includes an extensive flash movie (embedded in with the main.frm).  Within the movie, there are numerous controls (check boxes, drop-down boxes, etc).  We need to write those values either to registry (preferred) or to a notepad file, or the like, so that our application can read the values and run as designed.  While Flash may not directly write the keys, is it possible for it to trigger an external process or app to write the required values?

Please help with solution and possible example code.

Your help is appreciated!
Question by:technotommy
    LVL 11

    Expert Comment

    Hello. You can use reg.exe. See documentation here with examples
    LVL 42

    Expert Comment

    why not writing those values in to a configuration file?
    LVL 42

    Expert Comment

    also u can build .REG file with the values u wish to store in registry and run it from the flash component.

    Author Comment

    excellent possible solutions!

    Sedgwick - Do you have, or can you make example code for writing to config file?  or even better, example code for running the .reg file with flash?

    Many thanks!
    LVL 42

    Accepted Solution

    running reg files from flash:


    fscommand("exec", "<.reg file path>");

    creating config file:
    since we should treat the config file as xml then the code could be like this:

    my_xml = new XML("<configuration>
    <control id="txtBox1">
    <location x="12" y="50"/>
    <size width="100" height="100"/>
    <control id="dropDownList1">
    <location x="66" y="77"/>
    <size width="50" height="50"/>

    this is in case the config file doesn't exist (for example in the first time running the app), if it is exists u can load it using the following:

    var my_xml = new XML();
    my_xml.onLoad = function(success){

    if (success){


    //here u parse the configuration xml


    LVL 42

    Expert Comment

    to parse xml using flash check this tutorial:

    Author Closing Comment

    Great code!  Many thanks for your assistance!!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now