using System; using System.Runtime.InteropServices; using Microsoft.VisualStudio.Setup.Configuration; class A { public static void Main(string[] args) { Console.WriteLine("Creating instance of SetupConfiguration"); SetupConfiguration setup = new SetupConfiguration(); Console.WriteLine("Created instance of SetupConfiguration"); var a = setup.EnumAllInstances(); ISetupInstance[] b = new ISetupInstance[1]; while (true) { b[0] = null; a.Next(1, b, out _); if (b[0] == null) break; ISetupInstance2 c = (ISetupInstance2)b[0]; Console.WriteLine("Instance - " + c.GetDisplayName()); Console.WriteLine("\t GetDisplayName = " + c.GetDisplayName()); Console.WriteLine("\t GetInstallationVersion = " + c.GetInstallationVersion()); Console.WriteLine("\t GetInstallationPath = " + c.GetInstallationPath()); Console.WriteLine("\t GetEnginePath = " + c.GetEnginePath()); } } }