C#获取文件版本信息
使用FileVersionInfo获取版本信息
FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.Current.StartupUri + "ICC2.0.exe");
string productName = info.ProductName;
string productVersion = info.ProductVersion;
string companyName = info.CompanyName;
string legalCopyright = info.LegalCopyright;
FileVersionInfo相关属性
https://msdn.microsoft.com/en-us/library/system.diagnostics.fileversioninfo(v=vs.110).aspx
| Name | Description | |
|---|---|---|
![]() |
Comments |
Gets the comments associated with the file. |
![]() |
CompanyName |
Gets the name of the company that produced the file. |
![]() |
FileBuildPart |
Gets the build number of the file. |
![]() |
FileDescription |
Gets the description of the file. |
![]() |
FileMajorPart |
Gets the major part of the version number. |
![]() |
FileMinorPart |
Gets the minor part of the version number of the file. |
![]() |
FileName |
Gets the name of the file that this instance of FileVersionInfo describes. |
![]() |
FilePrivatePart |
Gets the file private part number. |
![]() |
FileVersion |
Gets the file version number. |
![]() |
InternalName |
Gets the internal name of the file, if one exists. |
![]() |
IsDebug |
Gets a value that specifies whether the file contains debugging information or is compiled with debugging features enabled. |
![]() |
IsPatched |
Gets a value that specifies whether the file has been modified and is not identical to the original shipping file of the same version number. |
![]() |
IsPreRelease |
Gets a value that specifies whether the file is a development version, rather than a commercially released product. |
![]() |
IsPrivateBuild |
Gets a value that specifies whether the file was built using standard release procedures. |
![]() |
IsSpecialBuild |
Gets a value that specifies whether the file is a special build. |
![]() |
Language |
Gets the default language string for the version info block. |
![]() |
LegalCopyright |
Gets all copyright notices that apply to the specified file. |
![]() |
LegalTrademarks |
Gets the trademarks and registered trademarks that apply to the file. |
![]() |
OriginalFilename |
Gets the name the file was created with. |
![]() |
PrivateBuild |
Gets information about a private version of the file. |
![]() |
ProductBuildPart |
Gets the build number of the product this file is associated with. |
![]() |
ProductMajorPart |
Gets the major part of the version number for the product this file is associated with. |
![]() |
ProductMinorPart |
Gets the minor part of the version number for the product the file is associated with. |
![]() |
ProductName |
Gets the name of the product this file is distributed with. |
![]() |
ProductPrivatePart |
Gets the private part number of the product this file is associated with. |
![]() |
ProductVersion |
Gets the version of the product this file is distributed with. |
![]() |
SpecialBuild |
Gets the special build information for the file. |
C#获取文件版本信息的更多相关文章
- Powershell 获取文件版本信息
获取文件版本信息,通过FileVersionInfo::GetVersioninfo(file) 来获取信息 function Check-DdpstoreFileVersion{ $Ddpstore ...
- WIN32 API 获取文件版本信息
CString strVersion; CString strPath(_T("xxxxxxxx.exe")); // 读文件信息 DWORD dwVerHnd = 0; DWOR ...
- win32api 获取文件版本信息
#coding:utf-8 myPath="C:\\ime" import os from win32api import GetFileVersionInfo, LOWORD, ...
- Web 在线文件管理器学习笔记与总结(11)获取文件夹信息 (12)返回上一级操作
(11)获取文件夹信息 文件夹没有修改操作. index.php: <?php require 'dir.func.php'; require 'file.func.php'; require ...
- [转]SVN使用log,list,cat,diff查看所有及特定文件版本信息
[转]SVN使用log,list,cat,diff查看所有及特定文件版本信息 http://onefishum.blog.163.com/blog/static/5184730520113153402 ...
- C#获取apk版本信息
获取很多人都会问我为什么要写这个博客,原因很简单,这次研发apk版本信息的时候网上查了很多的资料都没有这方面的信息,因此这次功能完了想写下方法,如果以后博友们遇到了可以直接copy,不用花很多的时间, ...
- os.path.join合并 os.path.dirname返回上一级目录 os.path.exists(path) os.stat('path/filename')获取文件/目录信息
import os str1 = "grsdgfd" str2 = "wddf" str3 = "gddgs" # print(str1 + ...
- 获取windows版本信息的做法
作者:朱金灿 来源:http://blog.csdn.net/clever101 个人不建议用 GetVersion 或GetVersionEx 之类的 API 来获取系统版本号.注意微软也说过,这个 ...
- C#获取文件版本、文件大小等信息
使用以下C#程序代码可以非常方便地获取Windows系统中任意一个文件(尤其是可执行文件)的文件版本.文件大小.版权.产品名称等信息.所获取到的信息类似于在Windows操作系统中右键点击该文件,然后 ...
随机推荐
- 细说Vue作用域插槽,匹配应用场景。
最近在官方文档中看到,vue新增了一种插槽机制,叫做作用域插槽.要求的版本是2.1.0+. 首先来说一下:顾名思义,所谓作用域插槽,主要就在作用域,需要注意的是(以下几点看不懂不要紧,配合下面的例子, ...
- Nodejs学习之mongodb Error: failed to connect to [localhost:27017]
在连接mongodb时出现以下错误提示信息 events.js: throw er; // Unhandled 'error' event ^ Error: failed to connect to ...
- Linux shell中处理
awk是行处理器: 相比较屏幕处理的优点,在处理庞大文件时不会出现内存溢出或是处理缓慢的问题,通常用来格式化文本信息 awk处理过程: 依次对每一行进行处理,然后输出 awk命令形式: awk ...
- 谷歌浏览器升级引起的BUG
问题描述:在谷歌浏览器中,电脑打开A系统,添加附件时无法弹框. 预期结果:添加附件,可以打开弹框. 问题分析:谷歌浏览器自动升级,自55.0.2883.75后发布的新版本均自动停用Flash插件. 解 ...
- beta到production版本上线
1.beta版本到production上线,production要发到预发布测试一下避免配置问题导致发布异常.
- idea 无效的源发行版: 8解决方法
解决方式见连接 http://blog.csdn.net/leixingbang1989/article/details/51985601 可以关注我的公众账户 互联网开发者Club,公众账户分享个性 ...
- php 日期和时间
php date() 函数把时间戳格式化为更易读取的日期和时间 语法: date(formet,timestamp); 参数 描述 format 必需.规定时间戳的格式. timestamp 可选.规 ...
- Clion调试ROS包
1. 安装 从官网下载最新版本的Clion https://www.jetbrains.com/clion/ 并解压到指定的目录,例如: /home/xkc/software/clion-2017.2 ...
- windows server 2008 R2安装图片浏览器/照片查看器方法
有用户的电脑安装了windows server 2008 R2,浏览大量图片时很不方便,因为系统中没有照片查看器或图片浏览器.其实,win2008 R2是有照片查看器的,只是默认情况下没有开启.参考以 ...
- iOS开发-适配器和外观模式
适配器模式,属于结构型模式,其主要作用是将一个类的接口转换成客户希望的另外一个接口.适配器模式使得原本由于接口不兼容而不能一起工作的那些类可以一起工作.适配器模式有对象适配器和类适配器两种,类适配器模 ...
