Simple method to delete registry keys

Discussion in 'OT Technology' started by DigiCrime, Dec 8, 2009.

  1. DigiCrime

    DigiCrime If Only!

    Joined:
    Oct 25, 2001
    Messages:
    32,996
    Likes Received:
    100
    Location:
    St. Louis
    Need to make something up that I can run across multiple machines

    Example keys I need to remove

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{710993A2-4F87-41D7-B6FE-F5A20368465F}\1.0\0\win32]
    @="c:\\programs\\software\\ImageOle.dll"

    [HKEY_CURRENT_USER\Software\xsaidsoftware] entire tree

    Code would look like this?

    Dim WshShell
    Set WshShell = WScript.CreateObject("WScript.Shell")
    On Error Resume Next

    WshShell.RegDelete "HKEY_CURRENT_USER\Software\xsaidsoftware\"
    WshShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{710993A2-4F87-41D7-B6FE-F5A20368465F}\1.0\0\win32]
    @="c:\\programs\\software\\ImageOle.dll"

    WScript.Echo "RA Registry Entries removed."
    'End
     
  2. Fase

    Fase Your Face, In A Pickle Jar.

    Joined:
    Apr 6, 2004
    Messages:
    29,540
    Likes Received:
    0
    Location:
    Windsor, Ont, Canada.
    I don't think you need to go as far as a VB script. Just use a batch file. (.bat).

    To delete a registry key add a hyphen - to it.
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\Ty peLib\{710993A2-4F87-41D7-B6FE-F5A20368465F}\1.0\0\win32]

    [-HKEY_CURRENT_USER\Software\xsaidsoftware] entire tree
     
  3. Chris

    Chris New Member

    Joined:
    Oct 27, 2003
    Messages:
    14,711
    Likes Received:
    0
    Location:
    Texas on my mind
    :werd: .bat file ftw

    use the /s switch and have it run in a login script

    http://www.robvanderwoude.com/regedit.php
     

Share This Page