Powershell 获取文件版本信息
获取文件版本信息,通过FileVersionInfo::GetVersioninfo(file) 来获取信息
function Check-DdpstoreFileVersion
{
$DdpstorePath = Join-Path $Env:windir "System32\Ddpstore.dll"
if(Test-Path $DdpstorePath)
{
$DdpStoreFileVersionObj = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($DdpstorePath)
if($DdpStoreFileVersionObj)
{
$DdpStoreFileVersion = "{0}.{1}.{2}.{3}" -f $DdpStoreFileVersionObj.FileMajorPart,$DdpStoreFileVersionObj.FileMinorPart,$DdpStoreFileVersionObj.FileBuildPart,$DdpStoreFileVersionObj.FilePrivatePart
$scriptenv.IsRequiredUpdateForDdpstoreEnv = [version]$DdpStoreFileVersion -lt [version]"6.2.9200.20842"
}
}
}
Powershell 获取文件版本信息的更多相关文章
- C#获取文件版本信息
使用FileVersionInfo获取版本信息 FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.Current.St ...
- WIN32 API 获取文件版本信息
CString strVersion; CString strPath(_T("xxxxxxxx.exe")); // 读文件信息 DWORD dwVerHnd = 0; DWOR ...
- Powershell - 获取OS版本信息和catpion信息
Environment 获取 OSversion: $OSVersion = [System.Environment]::OSVersion.Version WMI获取Caption: $OSCap ...
- 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 来获取系统版本号.注意微软也说过,这个 ...
随机推荐
- Android工具:Hierarchy Viewer
Hierarchy Viewer 用途: 即可以用来优化自己的布局,也可以用来参考别人优秀的布局 打开方式: 运行工程,然后在\android-sdk-windows\tools目录下双击hierar ...
- PHP 自定义字符串中的变量名解析
PHP 自定义字符串中的变量名解析 这样一个需求:页面的 title 可以在后台自定义,自定义内容中可能包含变量,变量用 {$var} 表示, 其中 $var 为变量名 将 title 字段存入数 ...
- Clover 的功能就是给资源管理器加上 Chrome 一样的标签页
官网下载地址:http://cn.ejie.me/
- Inno Setup入门(十八)——Inno Setup类参考(4)
http://379910987.blog.163.com/blog/static/3352379720112122533866/ 编辑框 编辑框也叫文本框,是典型的窗口可视化组件,既可以用来输入文本 ...
- [Android实例] 推荐给你们一个好用的ListView、RecyclerView适配器
https://github.com/vihuela/RecyclerViewHelpper 如果用过RecyclerView的人都知道,高度不会包裹,然后写法好像也不是很简洁,甚至点击事件不好设 置 ...
- 第七章Openwrt安装服务器环境php+uhttpd+mysql
在前面的文章中刷openwrt.配置网络环境.挂载u盘都配置成功了之后,下面的操作就变得简单起来!!!! 1. putty连接到路由器 2. 安装php opkg install php5-fastc ...
- __argc和__argv变量
微软提供了全局变量__argc 和__argv.这两个变量由Windows在运行时自动赋值.其中__argv有ASCII和Unicode版本,分别为__argv和 __wargv.要使用这两个全局变量 ...
- Openshift初步学习问题集
1.设置资源限额 详细参考 https://docs.openshift.com/enterprise/3.2/admin_guide/quota.html#sample-resource-quota ...
- 三种常见的部署Kubernetes的方式
三种常见的部署Kubernetes的方式 嘹亮的小号 Ghostcloud-001工号,资深Docker玩家,分布式系统研发11年. 关注他 容器技术将应用程序及其依赖关系与操作系统进行分离,不 ...
- SQLAlchemy使用笔记--SQLAlchemy ORM(二)
參考: http://docs.sqlalchemy.org/en/rel_1_0/orm/tutorial.html#building-a-relationship http://docs.sqla ...