How to apply a Msi transform at uninstall?

2019-02-25 00:10发布

I'm trying to fix a Windows Installer based setup that is already released. The fix is for an error that occurs when uninstalling the package. For this I'd like to provide a .mst transform file that is applied before uninstalling. Is it possible to use a transform after the product was installed? Or can the transform be applied to an already installed .msi file before the uninstall is started? The command line I used was like this:

msiexec.exe /x {Product-Code} TRANSFORMS={Path-To}\bugfix.mst

3条回答
做自己的国王
2楼-- · 2019-02-25 00:50

Okay. I know this is an old post. But here's something in addition to the above.

Vividos was slightly in luck that bug fix can be applied to an MSI, using REINSTALLMODE=VOMUS wherein the existing cache MSI is 're-cached' with the new installer.

But the 'v' fails if the bug is in the transform applied during MSI installation. The 'v' recaches the MSI but not the transform applied to it.

In such a case the user will have to manually recache the MST from "C:\windows\installer[ProductCodeOfTheMsi]" (using VBScript or other). You will find the old MST here and your BUFIX.MST should have the same name as the old MST in the above location and replace it.

If you want to go through the registry route as how Brian mentioned; change the MST name to your new MST Name with its location.

查看更多
叼着烟拽天下
3楼-- · 2019-02-25 01:01

Transforms are only applied at first-install, or internally as part of a patch. To fix problems like this, you should consider applying a minor upgrade (although if size is a major concern, you should be able to package the minor upgrade as a patch). Be sure to pass v as part of the REINSTALLMODE property so that the new package replaces the old one; generally vomus is a good value for that property.

查看更多
老娘就宠你
4楼-- · 2019-02-25 01:02

You can apply a transform after the fact by editing the the HKEY_CLASSES_ROOT\Installer\Products entry for your app.

find your product, add a value called TRANSFORMS and point it to your new transform. Then when the uninstall is kicked off, it will use that transform.

查看更多
登录 后发表回答