Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Nov 2005
    Posts
    46

    Grin How Can Make Backup From Registery To Text File?

    Hi;
    I need make a backup from registery "HKCU, "Software\MyProduct\List" with all subdirectory (keys). But i don't know.

    thanks.

    Example:
    Code:
    key_name    = Registry.GetKeyNames(2, "Software\\MyProduct\\List");
    TextFile.WriteFromString(_DesktopFolder .. "\\Backup.txt", key_name, false);

  2. #2
    Join Date
    Oct 2005
    Location
    Brazil - Belo Horizonte
    Posts
    118
    Try this
    Code:
    result = Registry.GetKeyNames(HKEY_CURRENT_USER, "Software\\MyProduct\\List");
    TextFile.WriteFromString("".._DesktopFolder.."\\Backup.txt", result[1], false);
    That code gets the key names from HKEY_CURRENT_USER\Software\MyProduct\List and saves the first key name to a text file.

  3. #3
    Join Date
    Nov 2005
    Posts
    46
    Dear Daniel TM;
    thanks;


  4. #4
    Join Date
    Oct 2005
    Location
    Brazil - Belo Horizonte
    Posts
    118
    No problemo.

  5. #5
    Join Date
    Nov 2005
    Posts
    46
    Dear Daniel TM;
    thanks, but it is not work!

    i tray it but this can only write on text file a subfolder !
    example:

    I want make a backup from this path with all subfolders and contains:

    Code:
    HKEY Current User\Software\MyProduct
    Subfolders is:

    Code:
    1
    1
    3
    4
    your code just make backup from 1 subfolder without contains...

    tnx.
    Last edited by Soheyl; 02-16-2006 at 07:55 PM.

  6. #6
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    try something like this:
    Code:
    tkeynames = Registry.GetKeyNames(HKEY_CURRENT_USER, "Software\\MyProduct\\List\\");
    if tkeynames then
    	for n , key in tkeynames do
    		TextFile.WriteFromString("".._DesktopFolder.."\\Backup.txt", key, true); --append
    	end
    end
    as another option: at a command prompt type reg.exe export /?
    this allows you to export to a file the entrie tree based on your
    registry source start key

    you could write the commands to batch file and run it using
    File.Run(_SystemFolder.."\\reg.exe", commands, "", true) --wait till done

    another option is using the registry actions to create a table-s of the
    registry structure-key paths you wish to return the information to.

    with a bit of work you can add functionality to the table-s to return
    specfic data etc for each key etc.,append each line of a table to a text file perhaps.

    hth a little
    Last edited by Eagle; 02-16-2006 at 08:09 PM.

  7. #7
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    you would need to extend the above table example to include similar
    to cycle any subkeys etc for each main key as required
    (above table example only returns the keyname- no full path stuff)

    btw:

    TextFile.WriteFromString(_DesktopFolder.."\\Backup .txt", key, true); --append
    Last edited by Eagle; 02-16-2006 at 08:16 PM.

  8. #8
    Join Date
    Nov 2005
    Posts
    46
    Thanks Eagle; thanks...

    But i also want all cantains write to a text file;
    example:

    Code:
    [HKEY_CURRENT_USER\Software\MyProduct]
    "MyFolder"="C:\\Documents and Settings\\User\\Application Data\\MyApplication\\"
    "Servers"="*.update.microsoft.com download.windowsupdate.com"
    I want write to a text file this path with that:

    Code:
    Backup.txt
    MyFolder=C:\\Documents and Settings\\User\\Application Data\\MyApplication\\
    Servers=*.update.microsoft.com download.windowsupdate.com
    again big thanks for your help...

  9. #9
    Join Date
    Nov 2005
    Posts
    46
    I found it...
    I now can make backup and write to text file...
    thanks,

    I now have a new problem with Type Key, I can write any type key to text file but can't write key with type "REG_NONE" !
    AMS have Registry.GetType, can i set a Type for Value ?

    I need Registry.SetType for write this key's to text file...

    how can? tnx
    Last edited by Soheyl; 02-16-2006 at 09:45 PM.

  10. #10
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    Have a try at using the: tregvlnms = registry.getvaluenames(fullpath.."\\"..key) action

    to cycle each key path in your main table
    for n, value in tregvlnms do
    textfile.write....-append to your existing .txt

    you'll need to do a bit more to write to the text file
    all that you want in the format that you want.

  11. #11
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    maybe ..try the the reg type stuff as you mentioned..sounds like you
    just about got it

  12. #12
    Join Date
    Nov 2005
    Posts
    46
    Dear Eagle; AMS don't have Registry.SetType !
    please if may show this code.

  13. #13
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    no code..from memory you have to write the registry value in the
    same format as the reg.gettype format..using string manipulation

    have a look here:

    http://www.indigorose.com/forums/sho...isable+autorun

    may help you with format to write

  14. #14
    Join Date
    Nov 2005
    Posts
    46
    I think AMS can't write normally a key with type REG_NONE to text file...

    I try it... thanks...

  15. #15
    Join Date
    Mar 2005
    Location
    WA 'wait a while' - Australia
    Posts
    872
    glad to be of some assistance at least

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Example: Loading Paragraph Text Using a Timer
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 7
    Last Post: 11-25-2004, 05:10 PM
  2. Writing Text to a File
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:02 PM
  3. HOWTO: "Hide" Externally Referenced Files
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 03:19 PM
  4. Text File Actions
    By csd214 in forum Setup Factory 6.0
    Replies: 0
    Last Post: 12-06-2001, 12:50 AM
  5. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts