diff -r 667c75cad937 -r 45215572a774 Hardware/Ring0.cs --- a/Hardware/Ring0.cs Wed Jul 18 19:45:59 2012 +0000 +++ b/Hardware/Ring0.cs Wed Jul 18 20:20:26 2012 +0000 @@ -127,7 +127,8 @@ fileName = GetTempFileName(); if (fileName != null && ExtractDriver(fileName)) { - if (driver.Install(fileName)) { + string installError; + if (driver.Install(fileName, out installError)) { driver.Open(); if (!driver.IsOpen) { @@ -135,10 +136,13 @@ report.AppendLine("Status: Opening driver failed after install"); } } else { + string errorFirstInstall = installError; + // install failed, try to delete and reinstall driver.Delete(); - if (driver.Install(fileName)) { + string errorSecondInstall; + if (driver.Install(fileName, out errorSecondInstall)) { driver.Open(); if (!driver.IsOpen) { @@ -150,9 +154,8 @@ report.AppendLine("Status: Installing driver \"" + fileName + "\" failed" + (File.Exists(fileName) ? " and file exists" : "")); - report.AppendLine(); - report.Append("Exception: " + Marshal.GetExceptionForHR( - Marshal.GetHRForLastWin32Error()).Message); + report.AppendLine("First Exception: " + errorFirstInstall); + report.AppendLine("Second Exception: " + errorSecondInstall); } } } else {