{"id":26750,"date":"2022-06-07T18:00:57","date_gmt":"2022-06-07T12:30:57","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=26750"},"modified":"2022-06-07T19:06:06","modified_gmt":"2022-06-07T13:36:06","slug":"copy-file-details-version-product-context-menu","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/copy-file-details-version-product-context-menu\/","title":{"rendered":"Copy Detailed File Info to Clipboard via Right-Click Menu"},"content":{"rendered":"<p>The Details tab in the Properties sheet shows the file version, product name, copyright, and other details. However, Windows doesn&#8217;t let you copy the information to the clipboard.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26751\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/06\/copy-file-info-context-1.png\" alt=\"copy file information, version, product via right-click menu\" width=\"405\" height=\"543\" \/><\/p>\n<p>In this article let&#8217;s see how to copy the file info to the clipboard using PowerShell. You can also incorporate the command to the right-click menu if desired.<!--more--><\/p>\n<h2>Copy File Information via the Context Menu<\/h2>\n<p>You can add a &#8220;Copy File Info&#8221; command to the right-click menu for desired file types (.exe, .dll, .ocx, .sys, etc). This context menu item can be set to copy the file details to the clipboard automatically.\u00a0Follow these steps to do so:<\/p>\n<ol>\n<li>Download or create your <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">own REG file<\/a> (e.g., <code>copy_file_info.reg<\/code>) from the following contents:<br \/>\n<script src=\"https:\/\/gist.github.com\/winhelponline\/38a1ef1e87ed3057c853e2619716160f.js?file=copy_file_info.reg\"><\/script><\/li>\n<li>Double-click the registry file and click Yes when asked for confirmation.<\/li>\n<\/ol>\n<p>The &#8220;Copy File Info&#8221; context menu is now added for .exe, .dll, .ocx, and .sys file types.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26753\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/06\/copy-file-info-context-3.png\" alt=\"copy file information, version, product via powershell\" width=\"520\" height=\"204\" \/><\/p>\n<p><em><strong>Note:<\/strong> To reduce clutter in the right-click menu, the menu item is implemented as an extended context menu. This means the item would be visible only if you press the <code>Shift<\/code> key and right-click on the said file type. Also, the menu item is set to appear only for .exe, .dll, .sys, and .ocx file types.<\/em><\/p>\n<p>A PowerShell window would open and close quickly, copying the file details to the clipboard. He are some sample data:<\/p>\n<pre>FileVersionRaw     : 1.1.0.0\r\nProductVersionRaw  : 1.1.0.0\r\nComments           : \r\nCompanyName        : Sysinternals - www.sysinternals.com\r\nFileBuildPart      : 0\r\nFileDescription    : Run as different user\r\nFileMajorPart      : 1\r\nFileMinorPart      : 1\r\nFileName           : <strong>D:\\tools\\ShellRunAs.exe<\/strong>\r\nFilePrivatePart    : 0\r\nFileVersion        : 1.01\r\nInternalName       : ShellRunas\r\nIsDebug            : False\r\nIsPatched          : False\r\nIsPrivateBuild     : True\r\nIsPreRelease       : False\r\nIsSpecialBuild     : False\r\nLanguage           : English (United States)\r\nLegalCopyright     : Copyright ? 2008 Mark Russinovich and Jon Schwartz\r\nLegalTrademarks    : \r\nOriginalFilename   : ShellRunas\r\nPrivateBuild       : \r\nProductBuildPart   : 0\r\nProductMajorPart   : 1\r\nProductMinorPart   : 1\r\nProductName        : Sysinternals ShellRunAs\r\nProductPrivatePart : 0\r\nProductVersion     : 1.01\r\nSpecialBuild       :<\/pre>\n<pre>FileVersionRaw     : 10.0.19041.1706\r\nProductVersionRaw  : 10.0.19041.1706\r\nComments           : \r\nCompanyName        : Microsoft Corporation\r\nFileBuildPart      : 19041\r\nFileDescription    : Windows Explorer\r\nFileMajorPart      : 10\r\nFileMinorPart      : 0\r\nFileName           : <strong>C:\\Windows\\explorer.exe<\/strong>\r\nFilePrivatePart    : 1706\r\nFileVersion        : 10.0.19041.1620 (WinBuild.160101.0800)\r\nInternalName       : explorer\r\nIsDebug            : False\r\nIsPatched          : False\r\nIsPrivateBuild     : False\r\nIsPreRelease       : False\r\nIsSpecialBuild     : False\r\nLanguage           : English (United States)\r\nLegalCopyright     : ? Microsoft Corporation. All rights reserved.\r\nLegalTrademarks    : \r\nOriginalFilename   : EXPLORER.EXE.MUI\r\nPrivateBuild       : \r\nProductBuildPart   : 19041\r\nProductMajorPart   : 10\r\nProductMinorPart   : 0\r\nProductName        : Microsoft? Windows? Operating System\r\nProductPrivatePart : 1706\r\nProductVersion     : 10.0.19041.1620\r\nSpecialBuild       :<\/pre>\n<p><em>(Note that FileVersionRaw and ProductVersionRaw are different from FileVersion and ProductVersion data. For further reading, check out <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/core-infrastructure-and-security\/how-to-correctly-check-file-versions-with-powershell\/ba-p\/257642\" target=\"_blank\" rel=\"noopener nofollow\">How to (correctly) check file versions with PowerShell<\/a>)<\/em><\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-get-file-hash-via-right-click-menu-windows\/\">Get File Hash Checksum (MD5, SHA-256) via Right-click Menu<\/a><\/div>\n<hr \/>\n<h3>Get File Info using PowerShell manually<\/h3>\n<p>If you rather prefer to get file info manually (instead of a context menu addition), you need to open PowerShell and use the following command-line example:<\/p>\n<pre>(Get-Item \"D:\\tools\\ShellRunAs.exe\").VersionInfo | format-list * -force<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26754\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/06\/copy-file-info-context-4.png\" alt=\"copy file information, version, product via powershell\" width=\"581\" height=\"525\" \/><\/p>\n<p>To copy the items to the Clipboard, run:<\/p>\n<pre>(Get-Item \"D:\\tools\\ShellRunAs.exe\").VersionInfo | format-list * -force | Clip<\/pre>\n<p><strong>Tip:<\/strong> You can also use the following PowerShell &#8220;<code>Set-Clipboard<\/code>&#8221; method as an alternative to <a href=\"https:\/\/www.winhelponline.com\/blog\/copy-command-prompt-output-clipboard-save-file\/\">Clip.exe<\/a>.<\/p>\n<pre>(Get-Item \"D:\\tools\\ShellRunAs.exe\").VersionInfo | format-list * -force | Out-String | Set-Clipboard<\/pre>\n<h3>Useful Links (Third-party)<\/h3>\n<ul>\n<li><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/core-infrastructure-and-security\/how-to-correctly-check-file-versions-with-powershell\/ba-p\/257642\" target=\"_blank\" rel=\"noopener nofollow\">How to (correctly) check file versions with PowerShell &#8211; Microsoft Tech Community<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/30686\/get-file-version-in-powershell\" target=\"_blank\" rel=\"noopener nofollow\">Get file version in PowerShell &#8211; Stack Overflow<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/PowerShell\/PowerShell\/issues\/6008\" target=\"_blank\" rel=\"noopener nofollow\">File version information is incorrect \u00b7 Issue #6008 \u00b7 PowerShell<\/a><\/li>\n<li><a href=\"https:\/\/www.reddit.com\/r\/PowerShell\/comments\/pwahiz\/how_to_get_fileversion_and_product_version_same\/\" target=\"_blank\" rel=\"noopener nofollow\">How to get file version and product version same as file property dialogue? : PowerShell<\/a><\/li>\n<\/ul>\n<p>Note that if the asterisk <code>*<\/code> is not used in the above example(s), many of the file properties (especially the patch\/updated file version info) are hidden in the output.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Details tab in the Properties sheet shows the file version, product name, copyright, and other details. However, Windows doesn&#8217;t let you copy the information to the clipboard. In this article let&#8217;s see how to copy the file info to the clipboard using PowerShell. You can also incorporate the command to the right-click menu if &#8230; <a title=\"Copy Detailed File Info to Clipboard via Right-Click Menu\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/copy-file-details-version-product-context-menu\/\" aria-label=\"Read more about Copy Detailed File Info to Clipboard via Right-Click Menu\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[7],"tags":[114,876,396,441],"class_list":["post-26750","post","type-post","status-publish","format-standard","hentry","category-windows","tag-context-menu","tag-gist","tag-powershell","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":9532,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-get-file-hash-via-right-click-menu-windows\/","url_meta":{"origin":26750,"position":0},"title":"Get File Hash Checksum (MD5, SHA-256) via Right-click Menu","author":"Ramesh","date":"May 26, 2019","format":false,"excerpt":"Hashing means taking an input string of any length and giving out an output of a fixed length. Using the cryptographic hashing algorithm -- e.g., MD5, SHA-256, SHA-384, you can verify if two files are identical or not. The checksum is a hash value used for performing data integrity checks\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"get file hash right-click menu 7-zip","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/7zip-get-file-hash-crc-sha-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/7zip-get-file-hash-crc-sha-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/7zip-get-file-hash-crc-sha-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/7zip-get-file-hash-crc-sha-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":386,"url":"https:\/\/www.winhelponline.com\/blog\/copy-text-file-contents-to-clipboard-using-context-menu\/","url_meta":{"origin":26750,"position":1},"title":"Copy Text file Contents to Clipboard via Right-Click Menu","author":"Ramesh","date":"July 25, 2008","format":false,"excerpt":"To copy the contents of a text-based file, you open the file in an editor such as Notepad, use Select All and then copy the contents to the clipboard. How about accomplishing it using a command in the right-click menu? Add \"Copy to Clipboard\" to the Context Menu Start the\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/copyclip.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":275,"url":"https:\/\/www.winhelponline.com\/blog\/add-copy-as-path-right-click-menu-in-xp\/","url_meta":{"origin":26750,"position":2},"title":"How to Add &#8220;Copy as Path&#8221; to Right Click Menu in Windows XP","author":"Ramesh","date":"May 10, 2008","format":false,"excerpt":"Windows Vista and higher already include the useful Copy as Path option in the context menu, which helps you quickly copy the complete path of the selected file(s) or folder(s) to the Clipboard. Here is how to add \"Copy of Path\" feature in Windows XP. There are two methods discussed,\u2026","rel":"","context":"In &quot;Windows XP&quot;","block_context":{"text":"Windows XP","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-xp\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/copypath.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":231,"url":"https:\/\/www.winhelponline.com\/blog\/copy-target-url-context-menu-option-for-internet-shortcut-url-files\/","url_meta":{"origin":26750,"position":3},"title":"How to Copy Address of a Internet Shortcut (.URL) via Right-click Menu","author":"Ramesh","date":"April 26, 2008","format":false,"excerpt":"The Copy as Path command in the right-click menu is an extremely useful one to quickly copy the full path of a file or folder to clipboard. Similarly, for internet shortcut (.url) files, here is a script that lets you copy the web address (URL) of a internet shortcut, via\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"add \"copy target url\" context menu option for internet shortcuts","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/copytargeturl.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4395,"url":"https:\/\/www.winhelponline.com\/blog\/copy-command-prompt-output-clipboard-save-file\/","url_meta":{"origin":26750,"position":4},"title":"How to Copy Command Prompt Output Text to Clipboard or File","author":"Ramesh","date":"October 23, 2016","format":false,"excerpt":"Windows Command-line tools are great for troubleshooting, as well as automation. But, if you're stumped when a tech support guy on the phone asks you to run a built-in console command and copy the output displayed for diagnosing a problem, these Command Prompt basics will come in handy. This post\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"Command Prompt window","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/command-prompt-header.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/command-prompt-header.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/command-prompt-header.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3774,"url":"https:\/\/www.winhelponline.com\/blog\/copy-as-path-always-show-right-click-windows-10\/","url_meta":{"origin":26750,"position":5},"title":"Show &#8220;Copy as Path&#8221; Always in Right-Click Menu Without Shift Key","author":"Ramesh","date":"December 28, 2016","format":false,"excerpt":"This post tells you how to always show the Copy Path option in the right-click menu by default in Windows 10, without needing to press Shift\u00a0every time. The much useful \"Copy as Path\" built-in context menu exists in all versions of Windows. It's an extended command which means you need\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"copy-as-path-always-show-windows-10","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/copy-as-path-always-2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/26750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=26750"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/26750\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=26750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=26750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=26750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}