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(); }
/// <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); }