Before starting any editing on the Windows Registry please backup by opening windows registry by the following steps in this blog :
How to backup Windows Registry
Also you would require Administrator access to your Windows in order to make changes.
Enter the below script in powershell and press enter to run :# Define an array of root keys where you want to search
$rootKeys = @(
"HKEY_USERS",
"HKCU",
"HKLM"
)
# Define the search term (case insensitive)
$searchTerm = "*Acrobat*"
# Recursive function to delete registry keys
function Delete-RegistryKeys {
param (
[Parameter(Mandatory=$true)]
[string]$path
)
# Get all subkeys under the current path
$subKeys = Get-ChildItem -Path $path -ErrorAction SilentlyContinue
# Loop through each subkey
foreach ($subKey in $subKeys) {
# Check if the subkey name contains the search term
if ($subKey.Name -like $searchTerm) {
Write-Host "Deleting key: $($subKey.Name)"
Remove-Item -Path $subKey.PSPath -Recurse -Force
}
else {
# Recursively call the function for subkeys
Delete-RegistryKeys -path $subKey.PSPath
}
}
}
# Loop through each root key
foreach ($rootKey in $rootKeys) {
# Call the function with the current root key
Delete-RegistryKeys -path $rootKey
}
This website uses cookies to enhance your browsing experience, analyze site traffic, and serve better user experiences. By continuing to use this site, you consent to our use of cookies. Learn more in our cookie policy