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 来获取系统版本号.注意微软也说过,这个 ...
随机推荐
- JS零基础一步一步做应用全记录
1.起因 作为几个外卖重度依赖癌晚期患者,呆宿舍的时候几个人一起叫外卖已经是常事.偶然看到隔壁宿舍在饿了么订餐的时候,看到在饿了么的首页上有一个谁去拿外卖的一个小游戏/工具,感觉这个小细节,饿了么把握 ...
- Netty游戏服务器之六服务端登录消息处理
客户端unity3d已经把消息发送到netty服务器上了,那么ServerHandler类的public void channelRead(ChannelHandlerContext ctx, Obj ...
- Java中设置classpath、path、JAVA_HOME的作用?
1.classpath是用来找编译后的class文件的,操作系统或者编译器等会在这些目录下寻找对应的.class文件 2.path时用来找命令行执行文件的,操作系统或者其他软件会在这些目录下找对应的命 ...
- 二十四种设计模式:策略模式(Strategy Pattern)
策略模式(Strategy Pattern) 介绍定义一系列的算法,把它们一个个封装起来,并且使它们可相互替换.本模式使得算法的变化可独立于使用它的客户. 示例有一个Message实体类,对它的操作有 ...
- 判断客户端是PC还是手持设备的JS代码【转】
1.第一种: 复制代码代码如下: function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = [&quo ...
- iOS:键盘弹出和收起的通知使用
介绍:不论是UITextField,还是UITextView,使用它们输入文字时都是有键盘的弹出,此时可能会挡住我们创建的一分部其他视图,此时,就需要根据键盘的高度将我们被隐藏的部分View做向上或者 ...
- IntelliJ IDEA 创建 java Maven项目
1.下载安装Maven 下载官网:http://maven.apache.org/download.cgi 下载解压到当前目录并建立LocalWarehouse文件夹,该文件夹为自己的文件仓库做存储. ...
- git remote branch操作
将本地branch basic提交到remote的basic上: git push origin basic:basic 将remote的 basic branch更新到本地的 basic branc ...
- Java中PriorityQueue详解
Java中PriorityQueue通过二叉小顶堆实现,可以用一棵完全二叉树表示.本文从Queue接口函数出发,结合生动的图解,深入浅出地分析PriorityQueue每个操作的具体过程和时间复杂度, ...
- [Tools] Batch Create Markdown Files from a Template with Node.js and Mustache
Creating Markdown files from a template is a straightforward process with Node.js and Mustache. You ...