Office Customization Toolkit setting a formatted reg value
-
Have you tried a shorter string? What does a verbose installation log tell you ? - EdT 9 years ago
Answers (2)
Having said that, I'm at a loss to know quite why anyone wants to reproduce information which is already available. Most of the information you're trying to write there is in the 'Uninstall\[ProductCode] branch of the registry and transforms are noted in HKCR\Installer\Products\[CompressedProductCode]\TRANSFORMS.
Comments:
-
Thanks for the thoughts, I suppose that that might explain why a property that is set in the patch (NORTHWIND_APP_ID) gets substituted but not the ones that are in the base MSI (ProductCode etc) although [date] and [time] are perhaps in a grey area. I suppose that I could try NORTHWIND_APP_ID as a value datum (I had assumed that the pattern was betwen Keys and Values rather than properties set in the patch versus elsewhere. It just seemed annoying that some properties worked and not others and wondered if anyone else had achieved something similar but I guess I'll just have to live with it. Thanks for the thoughts though. I have often found your answers useful in the past too. - delap 9 years ago
This is a bit of a known bug and has been around for years. When you import a key, or add something with a value like [ProductVersion] the tool interprets it as: [\[]ProductVersion[\]]
Here is the relative info from the msi.chm:
If a substring of the form [\x] is found, it is replaced by the character x , where x is one character, without any further processing. Only the first character after the backslash is kept; everything else is removed. For example, to include a literal left bracket ([), use [\[]. The text [\[]Bracket Text[\]] resolves to [Bracket Text].
This was very easy to resolve before Office 2007, you could just edit the MST that was produced, but in the newer versions, not so easy.
When I have to do this for office, I either manually change the registry keys to actual values, or use a script.
The reason for using a script is the answer to another question. Have you tried uninstalling office yet?? It leaves the reg key that you added.
So, I normally use a script to add the reg key during install and then run another script during uninstall to remove the keys.
use the <command tag in the config XML file to execute the script (or reg key)