Deleting Registry Key

BatchPatch Forums Home Forums BatchPatch Support Forum Deleting Registry Key

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11954
    jsira7
    Participant

    Hey Doug,

    Would you know how I could delete a Registry Key with Batch Patch? I’m having unsuccess looking for a script online.

    #11955
    jsira7
    Participant

    I have used this successfully running it in CMD locally on the machine. However when I use Execute remote process from Batch Patch I get an error 1:

    reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components” /v {89820200-ECBD-11cf-8B85-00AA005B4340} /f

    #11957
    doug
    Moderator

    {89820200-ECBD-11cf-8B85-00AA005B4340} is a registry key, not a value. So it needs to be deleted with the syntax for removing a registry key, not the syntax for removing a registry value.

    This command does NOT work at the cmd prompt (nor in BP) because the syntax is wrong:

    reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components” /v {89820200-ECBD-11cf-8B85-00AA005B4340} /f

    This correct syntax works both at the cmd prompt and in BP:

    reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4340}" /f

    #11958
    jsira7
    Participant

    Yup! Worked like a charm! Thanks Doug!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.