24 lines
625 B
C#
24 lines
625 B
C#
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) {
|
|
a.Next(1, b, out _);
|
|
if (b[0] == null)
|
|
break;
|
|
|
|
ISetupInstance c = b[0];
|
|
Console.WriteLine("Instance - " + c.GetDisplayName());
|
|
}
|
|
}
|
|
}
|
|
|