Exemplo n.º 1
0
        private void bnOK_Click(object sender, EventArgs e)
        {
            // Create an installed application object
            InstalledApplication newApplication = new InstalledApplication();

            newApplication.Publisher   = tbPublisher.Text;
            newApplication.Name        = tbName.Text;
            newApplication.UserDefined = true;
            newApplication.Add();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Assign the file given the details specified
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bnAssignFile_Click(object sender, EventArgs e)
        {
            // OK we are going to assign this file - first we need to create the application itself
            InstalledApplication application = new InstalledApplication();

            application.Name      = tbProductName.Text;
            application.Publisher = tbPublisher.Text;
            application.Version   = tbVersion.Text;
            application.Add();
            _file.Assign(application.ApplicationID);
        }