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 }