Пример #1
0
        /// <summary>
        /// Configures the installed state for a product feature.
        /// </summary>
        /// <param name="productCode">Product code of the product to be configured.</param>
        /// <param name="feature">Specifies the feature ID for the feature to be configured.</param>
        /// <param name="installState">Specifies the installation state for the feature.</param>
        /// <exception cref="InstallerException">There was an error configuring the feature</exception>
        /// <remarks><p>
        /// The <see cref="RebootRequired"/> and <see cref="RebootInitiated"/> properties should be
        /// tested after calling this method.
        /// </p><p>
        /// Win32 MSI API:
        /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/msiconfigurefeature.asp">MsiConfigureFeature</a>
        /// </p></remarks>
        public static void ConfigureFeature(string productCode, string feature, InstallState installState)
        {
            uint ret = NativeMethods.MsiConfigureFeature(productCode, feature, (int)installState);

            Installer.CheckInstallResult(ret);
        }