Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Deleting a reg key with a .REG file

  • 14-05-2007 03:02PM
    #1
    Moderators, Arts Moderators Posts: 36,131 Mod ✭✭✭✭


    Adding a registry entry is easy enough, but how would I go abotu deleting a reg key using a .REG file? If I want to remove the keys in the following "folders", can I just enter some empty quotes or is there another method?

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\jetdComsrv\MyProgram]
    "1"="YT7STLL7TTA8T8V2"
    "4"="T9791JD83KEP89L3"
    "22"="YT7Y86V5C1BMWYR4"
    "24"="YJ7FHIS42T9RTQB5"

    [HKEY_LOCAL_MACHINE\SOFTWARE\MyPublisher\Licences]
    "1"="YT7STLL7TTA8T8V2"


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    http://support.microsoft.com/kb/310516
    Deleting Registry Keys and Values
    To delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:

    HKEY_LOCAL_MACHINE\Software

    put a hyphen in front of the following registry key in the .reg file:

    HKEY_LOCAL_MACHINE\Software\Test

    The following example has a .reg file that can perform this task.

    [-HKEY_LOCAL_MACHINE\Software\Test]

    To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:

    HKEY_LOCAL_MACHINE\Software\Test

    put a hyphen after the "TestValue"= in the .reg file. The following example has a .reg file that can perform this task.

    HKEY_LOCAL_MACHINE\Software\Test
    "TestValue"=-


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 95,435 Mod ✭✭✭✭Capt'n Midnight


    you can also remove keys with reg.exe at the command prompt

    If the Windows Server 2003 Beta 3 version of the Administration Tools Pack is installed, follow these steps:

    reg delete HKEY_CLASSES_ROOT\RasDialin.UserAdminExt /f
    reg delete HKEY_CLASSES_ROOT\RasDialin.UserAdminExt.1 /f


  • Moderators, Arts Moderators Posts: 36,131 Mod ✭✭✭✭pickarooney


    Cheers lads!


Advertisement