Results 1 to 4 of 4

Thread: importing registry logic

  1. #1

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197

    importing registry logic

    I dont need code for this, just a basic flowchart or something.

    I have a registry file (the thing that is made when you export the registry) of all the keys for the settings of my proggy. I want to import that, but only certain parts of it. So say I had these settings:
    Code:
    Settings
    	Old People
    	Peanut Butter
    	Squirels
    and I wanted to import just old people and squirells. Here's my idea so far:

    Export current settings (backup)
    copy the backup, so there are 2 backups.
    Import the entire new settings (including peanutbutter)
    export oldpeople
    export peanutbutter
    delete all registry settings
    import one of the backups
    import old people
    import peanutbutter
    delete backup unless there was an error

    Does that make sense? or is there a better way to do it?
    the file is a bit too complicated to parse BTW.
    retired member. Thanks for everything

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Why not just use VB to add the Keys and Values you want?

    VB Code:
    1. 'save
    2. SaveSetting App.Title, "Settings", "Old People", True
    3. SaveSetting App.Title, "Settings", "Peanut Butter", False
    4. SaveSetting App.Title, "Settings", "Squirels", True
    5.  
    6. 'load
    7. Dim oldpeople As Boolean
    8. Dim peanutbutter As Boolean
    9. Dim squirels As Boolean
    10. oldpeople = GetSetting(App.Title, "Setting", "Old People")
    11. peanutbutter = GetSetting(App.Title, "Setting", "Peanut Butter")
    12. squirels = GetSetting(App.Title, "Setting", "Squirels")

  3. #3

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    i want to have the user be able to export their preferences. then when they want to import them, they can select which to import.

    will this work for that then?
    retired member. Thanks for everything

  4. #4
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: importing registry logic

    Originally posted by markman
    I dont need code for this, just a basic flowchart or something.

    I have a registry file (the thing that is made when you export the registry) of all the keys for the settings of my proggy. I want to import that, but only certain parts of it. So say I had these settings:
    Code:
    Settings
    	Old People
    	Peanut Butter
    	Squirels
    and I wanted to import just old people and squirells. Here's my idea so far:

    Export current settings (backup)
    copy the backup, so there are 2 backups.
    Import the entire new settings (including peanutbutter)
    export oldpeople
    export peanutbutter
    delete all registry settings
    import one of the backups
    import old people
    import peanutbutter
    delete backup unless there was an error

    Does that make sense? or is there a better way to do it?
    the file is a bit too complicated to parse BTW.
    I don't understand... why would you dellete all registry settings if you're loading a backup after that. Besides... that backup will already have the setting for old people and peanutbutter... so, why would you import it again?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

Posting Permissions

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



Click Here to Expand Forum to Full Width