NumInstalledInstances

Distributing SQL Server with Applications

Distributing SQL Server Applications

NumInstalledInstances

Returns the number of instances of Microsoft® SQL Server™ installed on a computer.

Syntax

int NumInstalledInstances ( );

Arguments

The function takes no parameters.

Returns

The number of instances of SQL Server installed on the computer.

Remarks

Microsoft does not support more than 16 instances of SQL Server on a computer. Use NumInstalledInstances to check the number of existing instances of SQL Server on a computer before installing a new instance.

See Also

Desktop Engine Installation Sample