I'm making following batch script
set FileVersion = powershell (Get-Command C:\Tool.exe).FileVersionInfo.ProductVersion
echo %FileVersion%
I'd like retrieve attribute 'Product Version' of file C:\Tool.exe. To do that I use a powershell command and I want save that value to a variable called 'File Version' and later print out it, but it doesnt works! Can you help me?