Hi all,
i am exporting event log using ExportLogAndMessages() method but before im checking that event log is exist or not using EventLog.Exists(LogName) methods it is working fine for "Application", "Security" logs but when i am checking for "Setup" it is returing false value while checking but "Setup" log is available in machine.
why is is retuning false?
any other method to check events available on machine or not?
TIA
below is my code
if (EventLog.Exists(LogName))
{
EventLogSession logsession = new EventLogSession();
logsession.ExportLogAndMessages(LogName, PathType.LogName, "*", subfolderpath, false, CultureInfo.CurrentCulture);
}