Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Use DWORD file versions instead of String: http://stackoverflow.com/q…
Browse files Browse the repository at this point in the history
  • Loading branch information
xupefei committed May 4, 2015
1 parent b6b1556 commit 3defca0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion LECommonLibrary/GlobalHelper.cs
Expand Up @@ -66,9 +66,20 @@ private static string GenerateSystemDllVersionList()

foreach (var dll in dlls)
{
var version = FileVersionInfo.GetVersionInfo(
Path.Combine(
Path.GetPathRoot(Environment.SystemDirectory),
SystemHelper.Is64BitOS() ? @"Windows\SysWOW64\" : @"Windows\System32\",
dll));

result.Append(dll);
result.Append(": ");
result.Append(FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, dll)).FileVersion);
result.Append(String.Format(
"{0}.{1}.{2}.{3}",
version.FileMajorPart,
version.FileMinorPart,
version.FileBuildPart,
version.FilePrivatePart));
result.Append("\r\n");
}

Expand Down

0 comments on commit 3defca0

Please sign in to comment.