#include "StdAfx.h"
#include "ConfigDataSource.h"
#include "SqlServer.h"
#include <initguid.h>
#include <sqldmo.h>
#include <sqldmoid.h>
Functions | |
CA_API UINT __stdcall | SQLDMO_ListAvailableSQLServers (MSIHANDLE hInstall) |
Enumerate available SQL servers using Data Management Objects (DMO). More... | |
CA_API UINT __stdcall SQLDMO_ListAvailableSQLServers | ( | MSIHANDLE | hInstall | ) |
Enumerate available SQL servers using Data Management Objects (DMO).
SQLDMO_LIST_TYPE | List type to populate with data. |
SQLDMO_LIST_PROPERTY | The property associated with the list. |
SQLDMO_LIST_INDEX | Optional index to start adding items at, default is 2 (assumes one item in the list already). |
SQLDMO_LIST_LOCAL | Optional name to skip, eg. useful for local servers with "(local)". |
This function populates an MSI list attached to a property SQLDMO_LIST_PROPERTY and of type SQLDMO_LIST_TYPE, beginning with index SQLDMO_LIST_INDEX (default is 2, assuming there's one item). It executes SELECT * FROM [SQLDMO_LIST_TYPE] WHERE Property=[SQLDMO_LIST_PROPERTY] to locate the target.
See http://support.microsoft.com/kb/287737 for details about retreiving SQL servers with DMO.
This custom action can be used in combination with a combo box. Call the CA in the InstallUISequence.
Use a ComboBox control in the UI.
© Application Security Inc. - All Rights Reserved | http://msiext.codeplex.com |