Ejemplo n.º 1
0
        public MRUCleaner(List<string> KeywordsList, ScrubberGUI ScrubberGUIInst)
        {
            this.KeywordsList = KeywordsList;
            this.ScrubberGUIInst = ScrubberGUIInst;
            RegKeysList = new List<RegistryKey>();
            RegLocationsToClean = new List<string>();

            RegLocationsToClean.Add("software\\microsoft\\windows\\currentversion\\explorer\\recentdocs");
            RegLocationsToClean.Add("software\\microsoft\\windows\\currentversion\\explorer\\typedpaths");
            RegLocationsToClean.Add("Software\\Gabest\\Media Player Classic\\Recent File List");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit\\Favorites");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Paint\\Recent File List");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Wordpad\\Recent File List");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ComDlg32\\");
            RegLocationsToClean.Add("Software\\Microsoft\\MediaPlayer\\Player\\RecentFileList");
            RegLocationsToClean.Add("Software\\Microsoft\\MediaPlayer\\Player\\RecentURLList");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Map Network Drive MRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Search Assistant\\ACMru\\5603");
            RegLocationsToClean.Add("Software\\Microsoft\\Search Assistant\\ACMru\\5001");
            RegLocationsToClean.Add("Software\\Microsoft\\Search Assistant\\ACMru\\5647");
            RegLocationsToClean.Add("Software\\Microsoft\\Terminal Server Client");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Doc Find Spec MRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FindComputerMRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\PrnPortsMRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StreamMRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Common\\Open Find\\Microsoft Word\\Settings");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Word\\User MRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Common\\Open Find\\Microsoft Excel\\Settings");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Excel\\Recent Files");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Common\\Open Find\\Microsoft FrontPage\\Settings");
            RegLocationsToClean.Add("Software\\Microsoft\\FrontPage\\Explorer\\FrontPage Explorer");
            RegLocationsToClean.Add("Software\\Microsoft\\FrontPage\\Editor\\Recently Used URLs");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Common\\Open Find\\Microsoft PowerPoint\\Settings");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\PowerPoint\\Recent File List");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Common\\Open Find\\Microsoft Access\\Settings\\Open\\File Name MRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Common\\Open Find\\Microsoft Access\\Settings\\File New Database\\File Name MRU");
            RegLocationsToClean.Add("Software\\Microsoft\\Office\\15.0\\Access\\Settings");
            //RegLocationsToClean.Add("Software\\Microsoft\\Office\\");
            RegLocationsToClean.Add("Software\\microsoft\\internet explorer\\typedurls");
            //RegLocationsToClean.Add("Software\\microsoft\\internet explorer");
            RegLocationsToClean.Add("Software\\Adobe\\MediaBrowser\\MRU");
            RegLocationsToClean.Add("Software\\Adobe\\Adobe Acrobat\\5.0\\AVGeneral\\cRecentFiles");
            RegLocationsToClean.Add("Software\\Adobe\\Acrobat Reader\\5.0\\AVGeneral\\cRecentFiles");
            RegLocationsToClean.Add("Software\\Adobe\\Adobe Acrobat\\8.0\\AVGeneral\\cRecentFiles");
            RegLocationsToClean.Add("Software\\microsoft\\direct3d\\mostrecentapplication");
            RegLocationsToClean.Add("Software\\microsoft\\windows\\currentversion\\applets\\regedit");

            foreach (string RegLocationToClean in RegLocationsToClean)
            {
                this.GetSubKeys(Registry.CurrentUser.OpenSubKey(RegLocationToClean, true));
            }
            foreach (RegistryKey key in this.RegKeysList)
            {
                this.CleanValues(key);
            }
        }
Ejemplo n.º 2
0
        private static void Main(string[] args)
        {
            using (ShellLink shortcut = new ShellLink())
            {
                shortcut.Target = Application.ExecutablePath;
                shortcut.WorkingDirectory = Path.GetDirectoryName(Application.ExecutablePath);
                shortcut.Arguments = "-s";
                shortcut.Description = "Settings GUI for Scrubber";
                shortcut.DisplayMode = ShellLink.LinkDisplayMode.edmNormal;
                shortcut.Save(Environment.ExpandEnvironmentVariables("%appdata%") + "\\Microsoft\\Windows\\Start Menu\\Programs\\Scrubber\\Scrubber Settings.lnk");
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SettingsGUI settings = new SettingsGUI();

            List<string> keywords = new List<string>(args);

            if (keywords.Count > 0)
            {
                if (keywords[0].StartsWith("-") || keywords[0].StartsWith("/"))
                {
                    if (keywords[0].Equals("-s") || keywords[0].Equals("--settings") || keywords[0].Equals("/s"))
                    {
                        Application.Run(settings);
                        Application.Exit();
                        return;
                    }
                    keywords.RemoveAt(0);
                }
            }

            foreach (string kw in settings.getKeywordsFromRaw())
            {
                if (!kw.Equals(""))
                    keywords.Add(kw);
            }

            if (keywords.Count != 0)
            {
                ScrubberGUI GUI = new ScrubberGUI(keywords);
                Application.Run(GUI);
            }
            else
            {
                Application.Run(settings);
                Thread t = new Thread(() => OpenApp(keywords));
                t.Start();
            }
        }
Ejemplo n.º 3
0
        public JumpListCleaner(string PathToJumpListFile, List<string> KeywordsList, ScrubberGUI ScrubberGUIInst)
        {
            this.PathToJumpListFile = PathToJumpListFile;
            this.KeywordsList = KeywordsList;
            this.ScrubberGUIInst = ScrubberGUIInst;

            this.InitalizeVariables();

            if (!this.ParseJumpList(this.PathToJumpListFile))
            {
                this.ScrubberGUIInst.DebugPrint("Info (JumpList): Deleting empty JumpList - " + PathToJumpListFile);
                try
                {
                    File.Delete(PathToJumpListFile);
                }
                catch (Exception e)
                {
                    this.ScrubberGUIInst.DebugPrint("-----\r\nError (JumpList): " + e.Message + "\r\n-----");
                }
            }
            this.DeleteUnwantedJumpListEntries();
        }