Get exe version
You can get file version of file using PowerShell Get-Command cmdlet. In the above command, Get-Command get dll assembly file version of the specified file using FileVersionInfo. FileVersion property. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.
Privacy policy. Thank you. Microsoft makes no warranties, express or implied, with respect to the information provided here. The version number of the file or null if the file did not contain version information. Then it prints the file description and version number in a text box. Version Especially the defaulting may be confusing. Philm Philm 3, 27 27 silver badges 25 25 bronze badges.
In the accepted answer a reference is made to "pathToExe". GetVersionInfo assembly. ProductVersion Hope this saves someone from doing some unnecessary extra steps. Ian H. Sophtware Sophtware 1, 1 1 gold badge 20 20 silver badges 34 34 bronze badges. This is only correct if you want to read version number of current running file. Where Program is your class name: Console.
ToString ;. Austin Moore 1, 5 5 gold badges 19 19 silver badges 43 43 bronze badges. Ralf Ralf 77 1 1 silver badge 1 1 bronze badge. GetVersionInfo Environment. FileVersion ;. Drakkainen Drakkainen 1, 9 9 silver badges 25 25 bronze badges. Use this, it works: using System. Why negative point? This works good and returns the version provided in AssemblyVersion: using System.
GetVersionInfo "path. ProductVersion Both solutions will give 1. Tuan Zaidi Tuan Zaidi 1 1 silver badge 13 13 bronze badges. No, Application. ProductVersion typically outputs 1. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Most Active Hubs Microsoft Teams. Security, Compliance and Identity. Microsoft Edge Insider. Azure Databases. Autonomous Systems. Education Sector. Microsoft Localization. Microsoft PnP. Healthcare and Life Sciences. Internet of Things IoT. Enabling Remote Work. Small and Medium Business. Humans of IT. Green Tech.
0コメント