


# A regular expression that will be checked against key names, value names, and value data (depending on the specified switches) # Specifies whether or not all subkeys should also be searched Search-Registry -Path HKLM:\SOFTWARE\Microsoft -Recurse -ValueNameRegex "ValueName1|ValueName2" -ValueDataRegex "ValueData" -KeyNameRegex "KeyNameToFind1|KeyNameToFind2" Search-Registry -Path HKLM:\SYSTEM\CurrentControlSet\Services\* -SearchRegex "svchost" -ValueData It outputs custom objects that contain the key and the first match type (KeyName, ValueName, or ValueData). This function can search registry key names, value names, and value data (in a limited fashion). Searches registry key names, value names, and value data (limited). With this in mind we can change the script to: Let’s say we have an MSI with the ProductName=”ThisIsMyMSI” and we know that this is a 32bit application. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ – For 64bit applications HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ – For 32bit applications This is cool because, as we know, the apps that you see in “Add/Remove programs” are stored in:

With this script, you can search for a certain value in the registry and get the registry key where that is present. However, I’ve found this Powershell script on technet: Search-Registry: Find Keys, Value Names, and Value Data in the Registry. One of them is that some clients want to retain the auto-update capabilities of a package.īut in this case, you end up with a problem during uninstall because the Product Code of the main package, will be replaced during update, so the users who want to uninstall it via Software Center will have a little bit of a surprise with this. I’ve come across some interesting scenarios during the years.
