Skip to content

Instantly share code, notes, and snippets.

@syu5-gh
Last active August 29, 2015 13:57
Show Gist options
  • Save syu5-gh/9889588 to your computer and use it in GitHub Desktop.
Save syu5-gh/9889588 to your computer and use it in GitHub Desktop.
HOW TO : Compare to .exe or .dll file version embedded as the version resource with PowerShell.
function Compare-FileVersion {
param($path, $version_str)
$ver_info = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($path)
if ($ver_info.FileVersion -eq $version_str) {
return $True
}
return $False
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment