Example #1
0
        internal StartupJunkNode(StartupEntryBase entry, string parentName)
        {
            Entry = entry;

            UninstallerName = parentName;

            ParentPath = entry.ParentLongName;
            Name       = entry.EntryLongName;

            /*if (!string.IsNullOrEmpty(entry.CommandFilePath))
             * {
             *  ParentPath = Path.GetDirectoryName(entry.CommandFilePath);
             *  Name = Path.GetFileName(entry.CommandFilePath);
             * }*/

            Confidence.Add(StartupJunk.ConfidenceStartupMatched);

            var normalStartupEntry = entry as StartupEntry;

            if (normalStartupEntry != null && normalStartupEntry.IsRunOnce)
            {
                // If the entry is RunOnce, give it some negative points to keep it out of automatic removal.
                // It might be used to clean up after uninstall on next boot.
                Confidence.Add(StartupJunk.ConfidenceIsRunOnce);
            }
        }
        public StartupJunkNode(StartupEntryBase entry, ApplicationUninstallerEntry application, IJunkCreator source)
            : base(application, source)
        {
            Entry = entry ?? throw new ArgumentNullException(nameof(entry));

            Confidence.Add(ConfidenceStartupMatched);

            if (entry is StartupEntry normalStartupEntry && normalStartupEntry.IsRunOnce)
            {
                // If the entry is RunOnce, give it some negative points to keep it out of automatic removal.
                // It might be used to clean up after uninstall on next boot.
                Confidence.Add(ConfidenceStartupIsRunOnce);
            }
        }
        internal StartupJunkNode(StartupEntryBase entry, string uninstallerName)
            : base(entry.ParentLongName, entry.EntryLongName, uninstallerName)
        {
            Entry = entry;

            Confidence.Add(StartupJunk.ConfidenceStartupMatched);

            var normalStartupEntry = entry as StartupEntry;

            if (normalStartupEntry != null && normalStartupEntry.IsRunOnce)
            {
                // If the entry is RunOnce, give it some negative points to keep it out of automatic removal.
                // It might be used to clean up after uninstall on next boot.
                Confidence.Add(StartupJunk.ConfidenceIsRunOnce);
            }
        }
Example #4
0
 private static string CreateDisabledEntryPath(StartupEntryBase startupEntry)
 {
     return(Path.Combine(DriveDisableBackupPath, startupEntry.EntryLongName + BackupExtension));
 }