How do I programmatically get the Infotip data for a particular exe file in Win7?
I am referring to the popup box that you see when hovering over a filename in Windows Explorer.
Here's an example script that pulls that data from System.Diagnostics.FileVersionInfo
and Get-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"
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.