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

Urgent: Want changes made by one installer to be undone by another installer

Hi there,
I want changes made by one installer (A) to be undone (uninstalled) by another installer.
What changes can I make in Installer A so that installer B can undo changes made by installer A.

Installer A is fixing problem (bug) present in installer B. I also do not want installer A entry to appear in "Add/Remove programs" list.

Thanks so much in advance.
Pankaj
Labels (1)
0 Kudos
(2) Replies
Nick_Umanski
Level 7

You can use a VB Script CA to modify another installation. This one targets previous versions on an upgrade, but you can substitute a different upgrade code:

on error resume next

Const msiOpenDatabaseModeTransact = 1

Set oInstaller = Session.Installer

For Each ProductCode in oInstaller.RelatedProducts(Session.Property("UpgradeCode"))

Set oDatabase = oInstaller.OpenDatabase( oInstaller.ProductInfo( ProductCode, "LocalPackage" ), msiOpenDatabaseModeTransact )

Set oView = oDatabase.OpenView("DELETE FROM `RemoveFile` WHERE `FileName`='ABC'" )
oView.Execute
Set oView = oDatabase.OpenView("UPDATE `InstallExecuteSequence` SET `Condition`='VersionNT' WHERE `Action`='DEF'" )
oView.Execute
Set oView = oDatabase.OpenView("DELETE FROM `InstallExecuteSequence` WHERE `Action`='GHI'" )
oView.Execute
Set oView = oDatabase.OpenView("UPDATE `Component` SET `Attributes`='16' WHERE `Component`='XYZ'" )
oView.Execute

oDatabase.Commit
Next
0 Kudos
Christopher_Pai
Level 16

This sounds like a recipe for a diaster. One installer shouldn't intentionally mess with components registered to another installer.

Have you instead considered authoring a patch for the bad installer?
0 Kudos