In-house scripting standards mandate setting a reg key to track installed applications:

HKLM\Software\Northwind\Applications\[NORTHWIND_APP_ID]\
    ProductName=[ProductName]
    ProductCode=[ProductCode]
    ProductVersion=[ProductVersion]
    TRANSFORMS=[TRANSFORMS]
    Installed=[Date]|[Time]

NORTHWIND_APP_ID is usually set to something like Manufacturer_ProductName_ProductVersion_Architecture_InternalReleaseVersion with spaces replaced with underscores.  This is used as a key to track applications (eg in a CMDB) and for things like container and group names which relate to the app.

In the OCT (2013, 32 bit) I set NORTHWIND_APP_ID to Microsoft_Office_Professional_Plus_2013_15_x86_S001 and then in the Add Registry Entries section I create the keys above using the formatted data type to insert the property values into the Key Names and Value Data as above.  This works fine in a conventional transform but in the OCT the value of NORTHWIND_APP_ID is correctly substituted into the key names but the value data is not (so I see the property name in square brackets rather than the property value.  Anyone have any ideas on how I might be able to make this work?

1 Comment   [ + ] Show Comment

Comments

  • Have you tried a shorter string? What does a verbose installation log tell you ?
Please log in to comment

Answers

0
As you may know, Office no longer uses MSIs in the traditional way, relying on (what I call) pseudo-patches rather than transforms. As such, I'm not sure whether the process refers back at all to the principal MSI for property value-gathering. I think you might have to build a little script which gets that information from the MSI and then populates the relevant registry entries.

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.
Answered 04/03/2015 by: VBScab
Red Belt

  • 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.
Please log in to comment
0

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)

Answered 04/04/2015 by: Badger
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity