public CheckResult CheckCPRSettings()
        {
            //if (string.IsNullOrEmpty(configuration.CCMCPRFile.Trim()))
            //    return CheckResult.FailWith("File [CCMCPRFile] is not set in configuration");
            if (!string.IsNullOrEmpty(configuration.CCMCPRFile.Trim()) && !File.Exists(Path.Combine(homeFolder, configuration.CCMCPRFile)))
            {
                CheckResult.FailWith("File [CCMCPRFile] is not found: " + configuration.CCMCPRFile);
            }
#if !DEBUG
            if (string.IsNullOrEmpty(configuration.CCMHost.Trim()))
            {
                return(CheckResult.FailWith("[CCMHost] is not set in configuration"));
            }
#endif
            if (string.IsNullOrEmpty(configuration.CCMPort.Trim()))
            {
                return(CheckResult.FailWith("[CCMPort] is not set in configuration"));
            }

            return(CheckResult.Success);
        }
        //// http://stackoverflow.com/questions/11709862/check-if-directory-is-accessible-in-c
        //private static bool CanRead(string path) {
        //    try {
        //        var readAllow = false;
        //        var readDeny = false;
        //        var accessControlList = Directory.GetAccessControl(path);
        //        var accessRules = accessControlList.GetAccessRules(true, true, typeof(SecurityIdentifier));

        //        foreach (
        //            var rule in
        //                accessRules.Cast<FileSystemAccessRule>().Where(rule => (FileSystemRights.Read & rule.FileSystemRights) == FileSystemRights.Read)) {
        //            switch (rule.AccessControlType) {
        //                case AccessControlType.Allow:
        //                    readAllow = true;
        //                    break;
        //                case AccessControlType.Deny:
        //                    readDeny = true;
        //                    break;
        //            }
        //        }

        //        return readAllow && !readDeny;
        //    } catch (UnauthorizedAccessException) {
        //        return false;
        //    }
        //}

        private CheckResult CheckConfigFileExist()
        {
            var configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            if (!configFile.HasFile)
            {
                LogHelper.GetLogger().WriteEntry("CMSSync cannot find it's configuration file: " + configFile.FilePath, EventLogEntryType.Error, LogHelper.EVT_ERROR_CONFIG);
                return(CheckResult.FailWith(true, "Config file " + configFile + " doesn't exist!"));
            }

            //checks unknown settings
            //var settGroup = configFile.GetSectionGroup("applicationSettings") as System.Configuration.ApplicationSettingsGroup;
            //foreach (ClientSettingsSection s in settGroup.Sections)
            //{
            //    foreach (SettingElement ss in s.Settings)
            //    {
            //        string t = ((SettingElement)ss).Name.ToString();
            //    }
            //}

            return(CheckResult.Success);
        }