• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

Add Delete Modify registry keys with Flash

Hello.

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!
0
technotommy
Asked:
technotommy
  • 4
  • 2
1 Solution
 
enriquecadalsoCommented:
Hello. You can use reg.exe. See documentation here with examples http://www.petri.co.il/reg_command_in_windows_xp.htm
0
 
Meir RivkinFull stack Software EngineerCommented:
why not writing those values in to a configuration file?
0
 
Meir RivkinFull stack Software EngineerCommented:
also u can build .REG file with the values u wish to store in registry and run it from the flash component.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
technotommyAuthor Commented:
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!
0
 
Meir RivkinFull stack Software EngineerCommented:
running reg files from flash:

try:

on(release){
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>
<controls>
<control id="txtBox1">
<location x="12" y="50"/>
<size width="100" height="100"/>
</control>
<control id="dropDownList1">
<location x="66" y="77"/>
<size width="50" height="50"/>
</control>
</controls>
</configuration>");

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){

trace(this);

//here u parse the configuration xml

}

}
my_xml.load("app.config");
0
 
Meir RivkinFull stack Software EngineerCommented:
to parse xml using flash check this tutorial: http://www.kirupa.com/web/xml/XMLwayAround2.htm
0
 
technotommyAuthor Commented:
Great code!  Many thanks for your assistance!!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now