This tutorial will show you how to add or remove the Copy Contents to Clipboard context menu of text type files for all users in Windows 10 and Windows 11.
The Copy Contents to Clipboard context menu item will allow users to copy the contents of a single .bat, .cmd, .css, .html, .js, .log, .ps1, .reg, .rtf, .txt, or .vbs file to the clipboard to make it easy to paste the contents where you like.
While you must be signed in as an administrator to add or remove the context menu, all users can use the context menu.
EXAMPLE: "Copy Contents to Clipboard" context menu
In Windows 11, you will need to click/tap on Show more options first by default, then click/tap on Copy Contents to Clipboard.
Here's How:
1 Do step 2 (add) or step 3 (remove) below for what you would like to do.
2 Add "Copy Contents to Clipboard" to context menu
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Add_Copy_Contents_to_Clipboard_context_menu.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
;For BAT files
[HKEY_CLASSES_ROOT\batfile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\batfile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For CMD files
[HKEY_CLASSES_ROOT\cmdfile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\cmdfile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For CSS files
[HKEY_CLASSES_ROOT\SystemFileAssociations\.css]
"PerceivedType"="document"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.css\shell\Copy Contents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.css\shell\Copy Contents\command]
@="cmd /c clip < \"%1\""
;For HTML files
[HKEY_CLASSES_ROOT\htmlfile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\htmlfile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
[HKEY_CLASSES_ROOT\SystemFileAssociations\.html\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.html\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For JS files
[HKEY_CLASSES_ROOT\JSFile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\JSFile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For PS1 files
[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For REG files
[HKEY_CLASSES_ROOT\regfile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\regfile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For RTF files (Will not work for .rtf files if "Office Word" is the default app instead of "Wordpad")
[HKEY_CLASSES_ROOT\rtffile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\rtffile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For TXT and LOG files
[HKEY_CLASSES_ROOT\SystemFileAssociations\.txt\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.txt\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
[HKEY_CLASSES_ROOT\textfile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\textfile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
[HKEY_CLASSES_ROOT\txtfile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\txtfile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
[HKEY_CLASSES_ROOT\txtfilelegacy\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\txtfilelegacy\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
;For VBS files
[HKEY_CLASSES_ROOT\VBSFile\shell\CopyContents]
"Extended"=-
"Icon"="DxpTaskSync.dll,-52"
"MUIVerb"="Copy Contents to Clipboard"
[HKEY_CLASSES_ROOT\VBSFile\shell\CopyContents\command]
@="cmd /c clip < \"%1\""
3 Remove "Copy Contents to Clipboard" from context menu
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 4 below.
Remove_Copy_Contents_to_Clipboard_context_menu.reg
Download
(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\batfile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\cmdfile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.css]
[-HKEY_CLASSES_ROOT\htmlfile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.html\shell\CopyContents]
[-HKEY_CLASSES_ROOT\JSFile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\CopyContents]
[-HKEY_CLASSES_ROOT\regfile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\rtffile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.txt\shell\CopyContents]
[-HKEY_CLASSES_ROOT\textfile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\txtfile\shell\CopyContents]
[-HKEY_CLASSES_ROOT\txtfilelegacy\shell\CopyContents]
[-HKEY_CLASSES_ROOT\VBSFile\shell\CopyContents]
4 Save the .reg file to your desktop.
5 Double click/tap on the downloaded .reg file to merge it.
6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.
7 You can now delete the downloaded .reg file if you like.
That's it,
Shawn Brink
Attachments
Last edited: