【问题标题】:get Infotip via command line通过命令行获取信息提示
【发布时间】:2016-12-21 20:55:00
【问题描述】:

如何以编程方式获取 Win7 中特定 exe 文件的信息提示数据?

我指的是您在 Windows 资源管理器中将鼠标悬停在文件名上时看到的弹出框。

【问题讨论】:

    标签: python windows powershell command-line


    【解决方案1】:

    这是一个从System.Diagnostics.FileVersionInfoGet-ChildItem 提取数据的示例脚本:

    $path = "C:\example\file.exe"
    $versioninfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($path)
    $itemproperties= get-childitem $path
    [pscustomobject]@{
        "File Description" = $versioninfo.FileDescription
        Company = $versioninfo.CompanyName
        "File version" = $versioninfo.FileVersion
        "Date created" = $itemproperties.CreationTime
        Size = "$($itemproperties.length/1kb) kb"
    }
    

    【讨论】:

      猜你喜欢
      • 2015-06-02
      • 2012-05-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多