Display Name in Add/Remove Programs, MSI-Installed Products, and Compressed GUIDs
I was trying to rename a product’s display name found in its ARP (Add/Remove Programs) entry. There is a registry key that lists just about every product installed on your machine:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Most (if not all) MSI-installed products have an entry under this key that is the ProductCode GUID. Every product under this key seems to have a DisplayName value, some of which you can modify and it will show the change in ARP. However, it appeared any product installed via MSI did not work this way. So I went registry hunting for any other entries the MSI installers might create. I found the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer
This key has many helpful sub-keys (including Assemblies, Components, Features, Patches, Products, and UpgradeCodes); the Products sub-key is the most important to me at the moment. Under this sub-key there are many entries (not as many as the first location I mentioned; these appear to MSI only products) that appear to be GUIDs without hyphens and braces. However, the key that represented the product I was interested in didn’t match the ProductCode I had. But in one of the values, there was a PackageCode that was indeed the correct package GUID (different than ProductCode) and the ProductName matched as well. Turns out for MSI-installed products I could change this ProductName value and it would make the change to its ARP entry.
But I was puzzled how I would know which entry to pick for any given product under this Products sub-key. I ended up coming across this blog post that explained what these different GUIDs are (called Compressed GUIDs); focus on the "UPDATE" section by John Walker:
http://www.hanselman.com/blog/BATCHFILEVOODOODeterm…..UsingUpgradeCode.aspx
And then John Walker’s update mentions this link that explains how to convert back and forth between regular and Compressed GUIDs:
http://www.appdeploy.com/messageboards/tm.asp?m=11996&mpage=1⼅
Basically you break up the GUID into groupings and reverse them. See below:
- Original GUID: {abcdefgh-ijkl-mnop-qrst-uvwxyz123456}
- Groupings: abcdefgh ijkl mnop qr st uv wx yz 12 34 56
- Reversed Groupings: hgfedcba lkji ponm rq ts vu xw zy 21 43 65
- Compressed GUID: hgfedcbalkjiponmrqtsvuxwzy214365
Don’t know why Microsoft chose to butcher up GUIDs like this, but it’s nice to know.