Site icon Winhelponline

Fix: Can’t delete Avast Software Registry Key in Windows

Last week when I installed CCleaner on my system, it also installed Avast antivirus software stealthily, in the background. After I uninstalled Avast, a registry key named AVAST Software still remained in the registry, but it couldn’t be opened. When the AVAST Software branch was selected, it threw the following error:

Error Opening Key
AVAST Software cannot be opened.
An error is preventing this key from being opened.
Details: The system cannot find the file specified.

When I opened the Properties of the AVAST Software key, the Security tab was blank, showing the message: The requested security information is either unavailable or can’t be displayed.

I tried running Sysinternals RegDelNull to nuke the keys, but that didn’t help.

The same error can occur for AVG antivirus users.

Error Opening Key
AVG cannot be opened.
An error is preventing this key from being opened.
Details: The system cannot find the file specified.

Registry Reparse Point

Later I realized that the HKEY_LOCAL_MACHINE\Software\AVAST Software is a reparse point or registry link that links to the following key on Windows 64-bit systems:

HKEY_LOCAL_MACHINE\Software\WOW6432Node\AVAST Software

But, since the Avast uninstaller had wiped out the above key, the reparse point still remains but is orphaned.

On Windows 32-bit systems, the reparse point and the target key paths are reversed.

However, once I knew it’s only a reparse point, the fix turned out to be very simple; you don’t need to tinker with the registry key permissions or ownership.

Fix: Can’t delete Avast Software Registry Key

Method 1: Create AVAST Software key under WOW6432Node manually

To successfully remove the AVAST Software reparse point, first, manually create the missing target key. Follow these steps:

  1. Start the Registry Editor (regedit.exe)
  2. Create the AVAST Software key under the WOW6432Node key below.
    HKEY_LOCAL_MACHINE\Software\WOW6432Node\

    Alternately, run the following command from an admin Command Prompt window to create the key manually on a Windows 64-bit system:

    reg add "HKLM\Software\AVAST Software" /reg:32
  3. Then, go to the following key in the Registry Editor and delete it:
    HKEY_LOCAL_MACHINE\Software\AVAST Software

This deletes the linked key as well as the reparse point in one go.

Important Note: If, the WOW6432Node\AVAST Software key is the reparse point itself (32bit vs 64-bit Windows) which can’t be opened, and points to the key Software\AVAST Software, then you’ll need to create the target key (HKLM\Software\AVAST Software) key manually before deleting the reparse point.

Method 2: Use AvRegLink.exe from Avast Software

Avast software has a tool named AvRegLink.exe which can create, query or delete reparse points in the registry. This tool can be downloaded from the following URL:

http://public.avast.com/~hnanicek/AvRegLink.exe

Once downloaded, open admin Command Prompt and run the following command:

AvRegLink.exe delete "SOFTWARE\AVAST Software"

If, the WOW6432Node\AVAST Software key is the reparse point itself (32bit vs 64-bit Windows), which points to the key Software\AVAST Software, then you’ll need to run this command instead:

AvRegLink.exe delete "SOFTWARE\WOW6432Node\AVAST Software"

Additional Tips:

Before deleting the reparse point, if you want to query the reparse point to know where it’s pointing to, use this command-line:

AvRegLink.exe query "SOFTWARE\AVAST Software"
AvRegLink.exe query "SOFTWARE\WOW6432Node\AVAST Software"

To create a reparse point manually, use this command-line syntax:

AvRegLink.exe create LinkKey TargetKey

Method 3: Using the regln tool

The regln: Windows Registry Linking Utility can create or delete reparse points in the registry. Download regln.

Usage: regln [-v] <link_key> <target_key>
regln -d <link_key>

<link_key> is the new registry link key
<target_key> is an existing registry key being linked to
-v = volatile, exist in memory only
-d = delete link

 

regln -d "HKLM\Software\WOW6432Node\AVAST Software"

-and-

regln -d "HKLM\Software\AVAST Software"

This deletes the AVAST Software registry key and also the link from the HKEY_LOCAL_MACHINE\Software and HKEY_LOCAL_MACHINE\WOW6432Node\Software registry locations.

Exit mobile version