Esempio n. 1
0
        public override void Uninstall(IDictionary savedState)
        {
            string   oldDirectory = Directory.GetCurrentDirectory();
            FileInfo fi           = new FileInfo(Assembly.GetExecutingAssembly().Location);

            Directory.SetCurrentDirectory(fi.Directory.FullName);

            try
            {
                UnregisterCxpRtpFilters();
            }
            catch (DllNotFoundException)
            {
                MessageBox.Show("Unable to find CxpRtpFilters.ax in the local directory.", "File not found");
            }

            try
            {
                UnregisterScreenScraperFilter();
            }
            catch (DllNotFoundException)
            {
                MessageBox.Show("Unable to find ScreenScraperFilter.ax in the local directory.", "File not found");
            }

            Directory.SetCurrentDirectory(oldDirectory);

            MDShowEventLog.Uninstall();

            if (savedState.Count != 0)
            {
                base.Uninstall(savedState);
            }
        }
Esempio n. 2
0
        public override void Commit(IDictionary savedState)
        {
            MDShowEventLog.Install();

            string   oldDirectory = Directory.GetCurrentDirectory();
            FileInfo fi           = new FileInfo(Assembly.GetExecutingAssembly().Location);

            Directory.SetCurrentDirectory(fi.Directory.FullName);

            try
            {
                RegisterCxpRtpFilters();
            }
            catch (DllNotFoundException)
            {
                RtlAwareMessageBox.Show(null, Strings.MissingCxpRtpFiltersError, Strings.FileNotFound,
                                        MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
            }

            try
            {
                RegisterScreenScraperFilter();
            }
            catch (DllNotFoundException)
            {
                RtlAwareMessageBox.Show(null, Strings.MissingScreenScraperFilterError, Strings.FileNotFound,
                                        MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
            }

            Directory.SetCurrentDirectory(oldDirectory);
        }
Esempio n. 3
0
        public override void Install(IDictionary savedState)
        {
            // First, uninstall in case we weren't uninstalled cleanly before
            IDictionary state = new Hashtable();

            Uninstall(state);
            if (state.Count != 0)
            {
                Commit(state);
            }
            state = null;

            base.Install(savedState);

            MDShowEventLog.Install();

            string   oldDirectory = Directory.GetCurrentDirectory();
            FileInfo fi           = new FileInfo(Assembly.GetExecutingAssembly().Location);

            Directory.SetCurrentDirectory(fi.Directory.FullName);

            try
            {
                RegisterCxpRtpFilters();
            }
            catch (DllNotFoundException)
            {
                MessageBox.Show("Unable to find CxpRtpFilters.ax in the local directory.", "File not found");
            }

            try
            {
                RegisterScreenScraperFilter();
            }
            catch (DllNotFoundException)
            {
                MessageBox.Show("Unable to find ScreenScraperFilter.ax in the local directory.", "File not found");
            }

            Directory.SetCurrentDirectory(oldDirectory);
        }