Last active
August 29, 2015 13:57
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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