使用FileVersionInfo获取版本信息

  1. FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.Current.StartupUri + "ICC2.0.exe");
  2. string productName = info.ProductName;
  3. string productVersion = info.ProductVersion;
  4. string companyName = info.CompanyName;
  5. 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#获取文件版本信息的更多相关文章

  1. Powershell 获取文件版本信息

    获取文件版本信息,通过FileVersionInfo::GetVersioninfo(file) 来获取信息 function Check-DdpstoreFileVersion{ $Ddpstore ...

  2. WIN32 API 获取文件版本信息

    CString strVersion; CString strPath(_T("xxxxxxxx.exe")); // 读文件信息 DWORD dwVerHnd = 0; DWOR ...

  3. win32api 获取文件版本信息

    #coding:utf-8 myPath="C:\\ime" import os from win32api import GetFileVersionInfo, LOWORD, ...

  4. Web 在线文件管理器学习笔记与总结(11)获取文件夹信息 (12)返回上一级操作

    (11)获取文件夹信息 文件夹没有修改操作. index.php: <?php require 'dir.func.php'; require 'file.func.php'; require ...

  5. [转]SVN使用log,list,cat,diff查看所有及特定文件版本信息

    [转]SVN使用log,list,cat,diff查看所有及特定文件版本信息 http://onefishum.blog.163.com/blog/static/5184730520113153402 ...

  6. C#获取apk版本信息

    获取很多人都会问我为什么要写这个博客,原因很简单,这次研发apk版本信息的时候网上查了很多的资料都没有这方面的信息,因此这次功能完了想写下方法,如果以后博友们遇到了可以直接copy,不用花很多的时间, ...

  7. os.path.join合并 os.path.dirname返回上一级目录 os.path.exists(path) os.stat('path/filename')获取文件/目录信息

    import os str1 = "grsdgfd" str2 = "wddf" str3 = "gddgs" # print(str1 + ...

  8. 获取windows版本信息的做法

    作者:朱金灿 来源:http://blog.csdn.net/clever101 个人不建议用 GetVersion 或GetVersionEx 之类的 API 来获取系统版本号.注意微软也说过,这个 ...

  9. C#获取文件版本、文件大小等信息

    使用以下C#程序代码可以非常方便地获取Windows系统中任意一个文件(尤其是可执行文件)的文件版本.文件大小.版权.产品名称等信息.所获取到的信息类似于在Windows操作系统中右键点击该文件,然后 ...

随机推荐

  1. BZOJ.1875.[SDOI2009]HH去散步(DP 矩阵乘法)

    题目链接 比较容易想到用f[i][j]表示走了i步后到达j点的方案数,但是题目要求不能走上一条走过的边 如果这样表示是不好转移的 可以考虑边,f[i][j]表示走了i步后到达第j条边的方案数,那么有 ...

  2. #1075 : 开锁魔法III

    描述 一日,崔克茜来到小马镇表演魔法. 其中有一个节目是开锁咒:舞台上有 n 个盒子,每个盒子中有一把钥匙,对于每个盒子而言有且仅有一把钥匙能打开它.初始时,崔克茜将会随机地选择 k 个盒子用魔法将它 ...

  3. python学习之思维导图

    思维导图——牛刀小试 刚刚学完了python的网络编程,在复习整理知识点的过程中,了解到思维导图是一种强大的工具. 思维导图又叫心智导图,是表达发散性思维的有效图形思维工具 ,它简单却又很有效,是一种 ...

  4. Flask的使用

    一.路由系统 1.子域名的配置 """ 可传入的参数: @app.route('/user/<username>') @app.route('/post/&l ...

  5. 如何调整eclipse中代码字体大小

    找到windows--->preferences---->General------>Appearance---->color   and fonts   ---->ba ...

  6. Centos7 MongoDB-3.4

    MongoDB 是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的 关系型数据库遵循ACID规则 事务在英文中是transaction,和现实世界中的交易很类 ...

  7. [Go] 理解 golang 中的 nil

    nil是什么 相信写过Golang的程序员对下面一段代码是非常非常熟悉的了: if err != nil { // do something.... } 当出现不等于nil的时候,说明出现某些错误了, ...

  8. 让你提升命令行效率的 Bash 快捷键 [完整版]

    转自:http://linuxtoy.org/archives/bash-shortcuts.html 生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 大部分对其他 ...

  9. 实现Qemu aarch32虚拟开发板ping www.baidu.com

    环境 Qemu: 2.8.0 开发板: vexpress-ca9 概述 如果要玩物联网,至少应该让开发板实现联网,让qemu支持联网在之前的博文中已经有介绍了,但是如果只能在自己的局域网内玩耍就太没意 ...

  10. Linux:修改和删除已有变量

    变量修改 变量的修改有以下几种方式: 变量设置方式 说明 ${变量名#匹配字串} 从头向后开始匹配,删除符合匹配字串的最短数据 ${变量名##匹配字串} 从头向后开始匹配,删除符合匹配字串的最长数据 ...