Пример #1
0
        /// <summary>
        /// Installs files that are unexpectedly missing.
        /// </summary>
        /// <param name="product">Product code for the product that owns the file to be installed</param>
        /// <param name="file">File to be installed</param>
        /// <exception cref="InstallCanceledException">the user exited the installation</exception>
        /// <remarks><p>
        /// Win32 MSI API:
        /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/msiinstallmissingfile.asp">MsiInstallMissingFile</a>
        /// </p></remarks>
        public static void InstallMissingFile(string product, string file)
        {
            uint ret = NativeMethods.MsiInstallMissingFile(product, file);

            if (ret != 0)
            {
                throw InstallerException.ExceptionFromReturnCode(ret);
            }
        }