에 대한 다른 폴더로 복사 할 것을내가 오류를 내 PC에서 다른 폴더로 이벤트 로그 "응용 프로그램"을 복사 할 수 있지만 항상 얻으려고 백업 목적
내가 코드를 사용 : 내가 사용하는 경우에도"... 경로 'C의 일부를 찾을 수 없습니다 : \ WINDOWS를 \ system32를 \ winevt \ 로그 \ Application.evtx ... "
public void collectEventLogsFromSystem(string RequestedlogName,string newFolderPath)
{
string combinedLogToFind = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Eventlog\\" + RequestedlogName;
string LogEventsPath = (string)Registry.GetValue(combinedLogToFind, "File", null);
if (LogEventsPath != null)
{
System.IO.File.Copy(LogEventsPath, newFolderPath +"\\"+ RequestedlogName, true);
}
}//collectEventLogsFromSystem method
을명시 적 폴더 경로가 작동하지 않습니다.
System.IO.File.Copy(@"C:\Windows\System32\winevt\Logs\Application.evtx", "c:\\ttt\\Application.evtx", true);
어떤 아이디어가 있습니까?
고마워요! 이건 내 문제를 해결 ... 나는 미쳤다고 생각 ... 감사합니다 !! – MottiNissim