Exemple #1
0
        private void serviceInstaller_AfterInstall(object sender, InstallEventArgs e)
        {
            string initComplete = Context.Parameters["initComplete"];

            if (initComplete == null || initComplete == string.Empty)
            {
                PerformanceCounterSetup pcSetup = new PerformanceCounterSetup();
                pcSetup.Init("install");

                WriteOutConfig();

                Context.Parameters["initComplete"] = "true";
            }
        }
Exemple #2
0
        /// <summary>
        /// Override 'Uninstall' method of Installer class.
        /// </summary>
        /// <param name="mySavedState"></param>
        public override void Uninstall(IDictionary mySavedState)
        {
            if (mySavedState == null)
            {
                Console.WriteLine("Uninstallation Error !");
            }
            else
            {
                PerformanceCounterSetup pcSetup = new PerformanceCounterSetup();
                pcSetup.Init("uninstall");

                base.Uninstall(mySavedState);
            }
        }