Beispiel #1
0
        private static void UpdateLogRegistry(egistryKey logKey)
        {
            // TODO: write other Log values:
            // - MaxSize
            // - Retention
            // - AutoBackupLogFiles

            if (logKey.GetValue("File") == null)
            {
                string logName = GetLogName(logKey);
                string file;
                if (logName.Length > 8)
                {
                    file = logName.Substring(0, 8) + ".evt";
                }
                else
                {
                    file = logName + ".evt";
                }
                string configPath = Path.Combine(Environment.GetFolderPath(
                                                     Environment.SpecialFolder.System), "config");
                logKey.SetValue("File", Path.Combine(configPath, file));
            }
        }
Beispiel #2
0
		private static void UpdateLogRegistry (egistryKey logKey)
		{
			// TODO: write other Log values:
			// - MaxSize
			// - Retention
			// - AutoBackupLogFiles

			if (logKey.GetValue ("File") == null) {
				string logName = GetLogName (logKey);
				string file;
				if (logName.Length > 8) {
					file = logName.Substring (0, 8) + ".evt";
				} else {
					file = logName + ".evt";
				}
				string configPath = Path.Combine (Environment.GetFolderPath (
					Environment.SpecialFolder.System), "config");
				logKey.SetValue ("File", Path.Combine (configPath, file));
			}
		}