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操作系统中右键点击该文件,然后 ...
随机推荐
- Python - 利用flask搭建一个共享服务器
零.概述 我利用flask搭建了一个简易的共享服务器,分享给大家 一.python代码 import os import time from flask import Flask,render_tem ...
- vue中的dom基本渲染
一.输出动态标签请只对可信内容使用HTML插值,绝不要对用户提供的内容使用插值,容易导致xss攻击. <div id="J_app"> <div v-html=& ...
- Web前端性能优化——编写高效的JavaScript
前言 随着计算机的发展,Web富应用时代的到来,Web 2.0早已不再是用div+css高质量还原设计的时代.自Gmail网页版邮件服务的问世开始,Web前端开发也开启了新的纪元.用户需求不断提高,各 ...
- BZOJ.4553.[HEOI2016&TJOI2016]序列(DP 树状数组套线段树/二维线段树(MLE) 动态开点)
题目链接:BZOJ 洛谷 \(O(n^2)\)DP很好写,对于当前的i从之前满足条件的j中选一个最大值,\(dp[i]=d[j]+1\) for(int j=1; j<i; ++j) if(a[ ...
- 安装 Keepalived
安装环境 [root@node1 ~]# cat /etc/redhat-release CentOS Linux release (Core) [root@node1 ~]# cat /proc/v ...
- spring-boot 速成(1) helloworld
一.mac上安装 $ brew tap pivotal/tap $ brew install springboot 安装成功后,可在终端查看命令行 ➜ ~ spring --versionSprin ...
- Java高编译低运行错误(ConcurrentHashMap.keySet)
Java高编译低运行错误(ConcurrentHashMap.keySet) 调了一天: https://www.jianshu.com/p/f4996b1ccf2f
- [Canvas]Bombman v1.00
爆破小人Canvas版,请点此下载,并用浏览器打开试玩. 图例: 源码: <!DOCTYPE html> <html lang="utf-8"> <m ...
- 解决netaddr不能安装0.7.6以上版本
今天在Jenkins上添加了两个新jobs,但是同事提交代码后的自动测试运行出现错误.查看原因是tox命令在安装包依赖的时候,找不到大于0.7.6以上的版本,但可是我们明明安装过0.7.10了呀. 后 ...
- SciTe设置
对于新手来说,如果没有正确的配置,它就不是那么好使,比如选择中文时候出现乱码,缩进也不是你想象中的样子. 由于配置参数不是采用图形界面,而且出看配置代码会比较混乱,所以大家要睁大眼睛好好看咯- 程序中 ...
