0

I have created a program (C# dotnet) which update the different properties (like path Variables) of my MSI (Installshield 2009) project by using ISWiAuto18.ISWiProject like

 for (int count = 1; count <= m_ISWiProj.ISWiPathVariables.Count; count++)
                {
                    if (m_ISWiProj.ISWiPathVariables[count].Name == pathVar)
                    {
                        m_ISWiProj.ISWiPathVariables[count].Value = pathvarvalue;
                        m_ISWiProj.IswiAutoUpgradeEntries
                    }
        }

But Now I am unable to find a way to Update My Registry key values of Installshield project using the ISWiAuto18.ISWiProject ? Is there a way to Update Registry values?

Marxist Ali
  • 65
  • 2
  • 11

1 Answers1

0

The ISWiProject object has a ISWiComponents collection that allows you to get a reference to a ISWiComponent object. Once you do that you can use the ImportRegFile method to load additional registry data into the component. That's about the extent of the abilities of the automation interface.

If I understood what you were doing better I could give more advice. You might want to consider using a [PROPERTY] in your registry table of the ISM and then pass property values into the build. This would be a simple way of getting the variation points you might need.

Another approach is to use the ISWiProject object's UseXMLProjectFormat method to convert the ISM from XML to/from Binary and then either use an XML DOM to manipulate the ISM (DTD is rough but doable) or Windows Installer SQL queries if binary format. (WiX's DTF library Microsoft.Deployment.WindowsInstaller is sweet for this )

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100