public override void Uninstall(IDictionary savedState) { #region Check to make sure we're in an Administrator role WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent()); if (wp.IsInRole(WindowsBuiltInRole.Administrator) == false) { RtlAwareMessageBox.Show(null, Strings.YouMustBeAnAdministratorToUninstall, Strings.AdministratorPrivilegesRequired, MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0); Application.Exit(); } #endregion #region Basic Installer stuff base.Uninstall(savedState); #endregion #region Whack the Event Logs ConferenceEventLog.Uninstall(); #endregion #region Whack registry entries try { using (RegistryKey pcaKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft Research\\ConferenceXP", true)) { if (pcaKey != null) { pcaKey.DeleteSubKeyTree("Client"); } } } catch {} try { using (RegistryKey pcaKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft Research\\ConferenceXP", true)) { if (pcaKey != null) { pcaKey.DeleteSubKeyTree("Client"); } } } catch {} Installed = false; #endregion }
public override void Install(IDictionary savedState) { #region Check to make sure we're in an Administrator role WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent()); if (wp.IsInRole(WindowsBuiltInRole.Administrator) == false) { MessageBox.Show("You must be an Administrator to install ConferenceXP or run it for the first time.", "Administrator Privileges Required", MessageBoxButtons.OK, MessageBoxIcon.Stop); Application.Exit(); } #endregion #region Basic Installer stuff base.Install(savedState); #endregion #region Install the Event Logs ConferenceEventLog.Install(); #endregion #region Save the fact that we're installed to the registry Installed = true; #endregion }
public override void Install(IDictionary savedState) { #region Check to make sure we're in an Administrator role WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent()); if (wp.IsInRole(WindowsBuiltInRole.Administrator) == false) { RtlAwareMessageBox.Show(null, Strings.YouMustBeAnAdministratorToInstall, Strings.AdministratorPrivilegesRequired, MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0); Application.Exit(); } #endregion #region Basic Installer stuff base.Install(savedState); #endregion #region Install the Event Logs ConferenceEventLog.Install(); #endregion #region Save the fact that we're installed to the registry Installed = true; #endregion }