TechSpot

How do I mod a specific .reg file for a restorer? Revert actions

By getting there
Feb 24, 2009
  1. Hi

    I have a .reg file that introduces information from an ad server list to the registry.


    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Zones]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Zones\101com.com]
    "Type"=dword:00000001
    "DatabaseFile"="adservers.dns"
    "SecureSecondaries"=dword:00000001
    "NotifyLevel"=dword:00000001
    "AllowUpdate"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Zones\101order.com]
    "Type"=dword:00000001
    "DatabaseFile"="adservers.dns"
    "SecureSecondaries"=dword:00000001
    "NotifyLevel"=dword:00000001
    "AllowUpdate"=dword:00000000

    ETC and it goes on, I just include to show that the format/layout continues for each new introduced “key” if that is the “right terminology?”



    After reading on the net I see to delete a key rather than add a key one would ad “-“ to the front of the key!

    EG.
    [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Zones\101com.com]

    Still trying to take in what part exactly this deletes and will make sure I understand more before going any further!


    What I am attempting to do is make a second modified version of the .reg file that would reverse the actions of the first file only removing the new keys or parts of.

    If I keep reading I will work it out, at this stage I do not have a good enough understanding to use this without backing up the entire registry which would likely not be limited to this files changes alone depending on when you made the restore.

    I would most likely only want to remove the actual sites from the blocked list, with this I have assumed that remaining sub directories left after the blocked site key was removed will cause no registry problems?

    If someone can give me an example how the above information could be modified to correctly reverse the action specific to only reverting the first files additions or make any comment helping comments it is appreciated.

    My handle here is literal but I work to change it!

    Getting there



    Edit: Am I right in thinking?

    [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Zones]

    Would delete blocked site as well, just thought if they did not have a directory \Zones than Zones\101com.com for example could not exist as it is part of \Zones?
     
  2. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

  3. getting there

    getting there TS Rookie Topic Starter

    Im 45, its just me and my computer!

    Thanks, will check the link out.

    "Type"=dword:00000001
    "DatabaseFile"="adservers.dns"
    "SecureSecondaries"=dword:00000001
    "NotifyLevel"=dword:00000001
    "AllowUpdate"=dword:00000000

    So this above could be omited from the restorer version .reg and I would only need is

    [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Zones]
    or
    [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS]
    would revert all changes as \DNS does not pre-exsist in registry!

    Cheers for your input
     
  4. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    Yes

    But test by refreshing Regedit (it's in the toolbar somewhere ;) )
    - Should remove the key
     
  5. getting there

    getting there TS Rookie Topic Starter

    Cheers

    Thanks kimsland

    Between your assistance and my new square eyes from reading I should have confidence to make my reverting .reg file, I wanted to get a reasonable grasp first so that I might be a bit more adventurous. Still taking it in!

    Cheers
     
  6. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    Well if you want to go to the next layer ;)
    Search reg2vbs

    I prefer VBS ;)
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...