zoukankan      html  css  js  c++  java
  • Powershell 获取文件版本信息

    获取文件版本信息,通过FileVersionInfo::GetVersioninfo(file) 来获取信息

    function Check-DdpstoreFileVersion
    {
     $DdpstorePath = Join-Path $Env:windir "System32Ddpstore.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"
      }
     }
    }

  • 相关阅读:
    Business
    Triple Inversions
    protobuf
    16.04 ubuntu python3.6 install
    1.安装
    Tutorial2
    Tutorial1
    geometry_msgs的ros message 类型赋值
    UBUNTU QQ/TIM的救星
    ubuntu17.10升级到ubuntu18.04 LTS
  • 原文地址:https://www.cnblogs.com/binyao/p/3436013.html
Copyright © 2011-2022 走看看