Пример #1
0
        private void LoadMsi(string msiToInspect)
        {
            misPackage = new MsiPackage(msiToInspect);

            txtMSILocation.Text = msiToInspect;
            appName             = misPackage.DisplayName;
        }
Пример #2
0
        private void LoadMsiPackage()
        {
            try
            {
                string fileToOpen = string.Empty;
                if (openMsiFileDialog.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        this.FormState = FormStateEnum.Processing;
                        fileToOpen     = openMsiFileDialog.FileName;

                        MsiPackage misPackage = new MsiPackage(fileToOpen);
                        txtMSILocation.Text = fileToOpen;
                        txtAppName.Text     = misPackage.DisplayName;
                        LoadTargetEnvironments(misPackage.TargetEnvironments.ToArray());

                        LoadActions(txtAppName.Text, txtMSILocation.Text, misPackage.WebDirectories());

                        LoadInProgressServiceInstances(txtAppName.Text);
                    }

                    finally
                    {
                        this.Text      = string.Concat(txtAppName.Text, " : ", formText);
                        this.FormState = FormStateEnum.NotProcessing;
                    }
                }
            }
            catch (Exception ex)
            {
                DisplayError(ex);
            }
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            MsiPackage misPackage       = new MsiPackage(txtMSILocation.Text);
            string     installationGuid = misPackage.GetMsiProperty("ProductCode");

            LoadInstallationTip(installationGuid);
        }
Пример #4
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtMSILocation.Text))
            {
                return;
            }
            MsiPackage misPackage       = new MsiPackage(txtMSILocation.Text);
            string     installationGuid = misPackage.GetMsiProperty("ProductCode");

            LoadInstallationTip(installationGuid);
        }