Пример #1
0
            public bool IsAvailable()
            {
                switch (Type)
                {
                case TweakType.DisableService: return(ServiceHelper.GetServiceStatus(Key) != ServiceHelper.ServiceState.NotFound);

                case TweakType.DisableTask: return(TweakEngine.IsTaskPresent(Path, Key));

                case TweakType.BlockFile: return(File.Exists(Path));
                }
                return(winVer.TestHost());
            }
Пример #2
0
            public bool IsAvailable()
            {
                switch (Type)
                {
                case TweakType.DisableService: return(ServiceHelper.GetServiceState(Key) != ServiceHelper.ServiceState.NotFound);

                case TweakType.DisableTask: return(TweakEngine.IsTaskPresent(Path, Key));

                case TweakType.BlockFile:
                {
                    string FullPath = Environment.ExpandEnvironmentVariables(Path);
                    bool   ret      = File.Exists(FullPath);
                    return(ret);
                }
                }
                return(winVer.TestHost());
            }