cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shields_t
Level 2

How can I change a component property in an MST which has already been deployed?

I've been asked to do some remediation work on a piece of software which has been historically packaged via MST and deployed across a number of servers.

Unfortunately when said app is uninstalled, it removes the wow6432node in HKLM, a change made by the transform rather than the vendor's MSI. I have suggested that the component attribute be made permanent which has been agreed as the way to move forward however I've been tasked with finding a solution to the instances of the application which have already been deployed. Obviously a full upgrade is out of the question as I don't want a big chunk of the registry removed in the process.

I thought it may be possible with an MSP, I can't figure out how an MSP can affect the tables of an MST if indeed this is possible at all.

Can anybody suggest a solution please?

- See more at: http://www.itninja.com/question/how-can-i-change-a-component-property-in-an-mst-which-has-already-been-deployed#sthash.k8sDG9jS.dpuf
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

I know if you encounter the same sort of problem without a transform involved, the "best practice" answer is to create a minor upgrade package that includes a fix, and install it being certain to include the v in REINSTALLMODE. This fixes the component or custom action on the machine before the package is uninstalled. This is fairly straightforward and can get you out of several kinds of mess that makes some people recommend MsiZap.

What makes your case particularly troublesome is the interaction of the .mst that has already been applied. If I'm remembering the rule correctly, the transforms that make up a patch are magically reordered to apply before any .mst files, so you can't fix this with a .msp file. And what I don't recall is what control you have over .mst files in a minor upgrade or other REINSTALL scenario. I see three likely scenarios, but I don't know which of them are correct, and haven't been able to find anything yet that convinces me these approaches are supported. Are you equipped to test these on a VM?
[LIST=1]
  • Performing a recaching reinstall may offer you the chance to apply an additional transform.
  • Performing a recaching reinstall with no transforms may "remove" the old transform from the view.
  • Performing a recaching reinstall may leave you no way to affect the existing transform list.

    The best case scenario would probably be without any updates to the base, as the base .msi file isn't even yours. You could create a second transform that tweaks the changes made by the first, and try to recache/reinstall it with a command line like: msiexec /i base.msi TRANSFORMS="first.mst;fix.mst" REINSTALL=ALL REINSTALLMODE=vomus (possibly just v or vm would be enough). Second best, and slightly easier, would be if you can orphan the transform with a command line similar to the last, but without any TRANSFORMS; I wouldn't expect that to work, and there still may be some clean-up later.
  • 0 Kudos
    shields_t
    Level 2

    Hi MichaelU,

    Thanks for the advice, sadly REINSTALL doesn't appear to re-cache any MST associated with the installation, just the MSI. However I have been able to tweak the MST with the necessary change, drop it into the c:\windows\installer folder and then change the HKCR\installer\products\{GUID}\Transforms registry value to point to the new transform. I'm just carrying out some thorough testing now but this appears to work a treat.
    0 Kudos
    MichaelU
    Level 12 Flexeran
    Level 12 Flexeran

    Well, the latter is good news. As always, when mucking with registry keys owned by another product (in this case Windows Installer), it's best to do so very carefully and not to come to rely on it long term. Since this is a one time fix for a problem I'm sure you're fixing elsewhere, and you're probably only targeting a single version of Windows, this might work out just fine for you. Best luck!
    0 Kudos