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

Multiple Entry in Add/Remove program after upgrade

Hi,

I facing issue of having multiple Add/Remove program entry in the machine after installing and upgrading an application which is build in Install Shield 2009 MSI. Please let know how to resolve this problem.
Labels (1)
0 Kudos
(1) Reply
heathlmorris
Level 4

I am assuming you are trying to to do a Major Upgrade.

Things to check.

#1. ProductCode has Changed. (look inside the MSI's to confirm this.) If Not

#2. UpgradeCode is the same. (look inside the MSI's to confirm this.)

#3. A new MajorUpgradeItem is added inside your Project inside Media\Upgrades. (Can also Check inside the Upgrade Table inside Direct Editor there should be atleast 2 items, "Your upgrade" and the ISPreventDowngrade)

If you are planning to automate the ProductCode Change and MajorUpgrade, I suggest you do it through the Automation API through VisualStudio or someother scripting tool.

this is my C# Code inside a Class

using ISWiAuto15;

namespace WindowsFromsApplication
public partial class InstallBuilder : Form
{
public InstallBuilder()
{
InitializeComponent();
}

//Method that opens my .ismfile and generates a new ProductCode.
//Creates MajorUpgrade Table Entries and removes the old ones.

private void NewProductCode(string ismPath, string version)
{
if (_checkBoxProductCode.Checked)
{
//Creates and opens ISM Project
ISWiProject msiProj = new ISWiProject();
msiProj.OpenProject(ismPath, false);

//Generates and Assigns a new ProductCode
msiProj.ProductCode = msiProj.GenerateGUID();

//sorts through the upgrade table entries and removes all but preventdowngrade
foreach (IswiUpgradeTableEntry ute in msiProj.IswiUpgradeTableEntries)
{
if (ute.Attributes != 2)
{
ute.Delete();
}
}
//For some silly reason I cannot get a MajorUpgrade to work unless I create two entries. I think it's a Bug!
//This will generate a new Upgrade Table Entry (needed for MajorUpgrade)
msiProj.AddUpgradeTableEntry();
msiProj.AddUpgradeTableEntry();

msiProj.SaveProject();
msiProj.CloseProject();
}
}
}
0 Kudos