r/PowerShell • u/Cocoatrice • Feb 20 '26
Solved How to force delete specific registry entry using PowerShell (or other method)? Read the description.
There is few that I cannot delete, even though I changed permission to them to be the owner. I need to remove them, because Windows thinks that uninstalled program is still installed and I can't install it anew.
Basically, for some reason, I can't update PowerToys, so i Uninstalled it. But despite doing it, Windows still think it's installed. It doesn't appear anywhere on search or program list etc. So I wanted to remove it manually and I kept removing all the registry entries manually. However, some of them are still unremovable. When I use PowerToys installed, it says that "it cannot remove old version". That is, because old version does not exist. Anywhere. I used IObit Uninstaller and Advanced SystemCare to remove as much as I can, but it stil didn't help. These are programs that let you remove leftovers from the programs, invalid shortcuts or even registry entries that are here from not fully uninstalling. But it didn't help. Right now I don't have the program installed and can't install, because I have to uninstall something that doesn't exist.
Please, help...
6
u/Hemsby1975 Feb 20 '26
Try this link. Fix problems that block programs from being installed or removed - Microsoft Support It may help with the RegKeys that are protected by TrustedInstaller
2
u/laserpewpewAK Feb 20 '26
You can use psexec to launch a shell as system, that should allow you to force a deletion regardless of permissions.
2
u/SVD_NL Feb 20 '26
You can try msizap.exe, it's an old tool but it's served me well even with newer apps. Use at your own risk, it's no longer supported and can do some damage if not used correctly! It completely nukes any and all references to the msi product code you feed it.
Instructions
Possibly good binary? I'm not sure where i got it last time i needed it, but i've got a good version myself with the same hash.