Add "Select All" to the right-click menu in File Explorer

This time, I will show you how to add "Select All" to the right-click menu in Explorer.

Have you ever found it inconvenient that when you right-click in an empty area of ​​a folder in Windows 10/11, there is no "Select All" option in the menu?

If you follow the method introduced here, the "Select All" option will appear in the right-click menu, as shown in the image below.

Right-click menu in an empty area of ​​a folder
Right-click menu in an empty area of ​​a folder

*For Windows 11, it will be displayed in the "See more options" section of the right-click menu.

Windows 11 - Explorer Right-Click Menu
Windows 11 – Explorer Right-Click Menu

How to directly open the "See more options" right-click menu in Windows 11:

Here we will introduce two ways to add "Select All", but according to Microsoft, VBScript will be deprecated (removed) in the future, so we recommend the second method.

  1. Create a VBScript and add a menu item and a command to run the VBScript to the registry.
  2. Copy the existing "Select All" registry value and add it to the registry location related to the Explorer right-click menu (recommended)
table of contents

1. Create a VBScript and add a menu item and a command to run the VBScript to the registry.

Creating a VBScript and then adding the registry values ​​for the menu items takes a lot of time, so I have prepared a batch file.

By simply running the batch file as an administrator, you can automatically create the VBScript and add the registry value.

1. Create a new text file, copy and paste the following content, change the name to "Right-clickSelectAll.bat" and save it.

*Please save the file with the character code set to "ANSI" (to prevent Japanese characters from being garbled).

*If you are creating a batch file for the first time, please read the next page.

What is a batch file? How to create and run a batch file

@echo off
title 右クリックメニューにすべて選択を追加
if not exist "%windir%\SelectAll.vbs" goto setup
reg delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000012}" /f >nul 2>nul
reg delete "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden" /f >nul 2>nul
del /f /q "%windir%\SelectAll.vbs" >nul 2>nul
@echo msgbox "右クリックメニューのすべて選択を削除しました">msg.vbs 
@msg.vbs
@del msg.vbs
exit
:setup
color 0a
>>"%windir%\SelectAll.vbs" echo On Error Resume Next
>>"%windir%\SelectAll.vbs" echo dim wsh,setting
>>"%windir%\SelectAll.vbs" echo Set wsh=Wscript.Createobject("Wscript.shell")
>>"%windir%\SelectAll.vbs" echo wsh.SendKeys "^a"
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "%temp%\__.reg" >nul
for /f "tokens=2 delims==" %%. in ('find/i "HideFileExt" "%temp%\__.reg"') do set v=%%~.
del "%temp%\__.reg"
set v=%v:~-1%
if %v% equ 0 set vv=すべて選択
>"%temp%\_.reg" echo Windows Registry Editor Version 5.00
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]
>>"%temp%\_.reg" echo @="{00000000-0000-0000-0000-000000000012}"
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]
>>"%temp%\_.reg" echo @=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,73,\
>>"%temp%\_.reg" echo   68,64,6f,63,76,77,2e,64,6c,6c,00
>>"%temp%\_.reg" echo "ThreadingModel"="Apartment"
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]
>>"%temp%\_.reg" echo "CLSID"="{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
>>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]
>>"%temp%\_.reg" echo "method"="ShellExecute"
>>"%temp%\_.reg" echo "Param1"="SelectAll.vbs"
>>"%temp%\_.reg" echo "command"="すべて選択"
>>"%temp%\_.reg" echo "CLSID"="{13709620-C279-11CE-A49E-444553540000}"
regedit /s "%temp%\_.reg"
del /f /q "%temp%\_.reg"
@echo msgbox "右クリックメニューにすべて選択を追加しました">msg.vbs 
@msg.vbs
@del msg.vbs
exit

How To Use

1. Right-click on the batch file "Right-clickSelectAll.bat" and click "Run as administrator" to display a command prompt (black window).

2. At the same time, a message box will appear saying "Select All added to right-click menu." Click OK.

Added Select All to the right-click menu
Added Select All to the right-click menu

3. The command prompt will then close automatically, so please check to see if the item has been added to the right-click menu.

*If you want to delete the added menu and VBScript, run "Right-click select all.bat" again as an administrator.

Removed Select All from the right-click menu
Removed Select All from the right-click menu

How batch files work

The batch file works by adding a value to the registry to display the right-click menu and a command to run a VBScript, and then creating "SelectAll.vbs" in the Windows folder on the drive where the OS is installed.

The contents of "SelectAll.vbs (VBScript)" command the computer to click the keyboard shortcut key "Ctrl + A".

"Ctrl + A" is the shortcut key for "Select All".

Contents of "SelectAll.vbs":

On Error Resume Next
dim wsh,setting
Set wsh=Wscript.Createobject("Wscript.shell")
wsh.SendKeys "^a"

When you run the batch file, it checks whether "SelectAll.vbs" exists in the Windows folder, and if it doesn't exist, it creates it and writes the necessary values ​​to the registry.

If "SelectAll.vbs" exists in the Windows folder, it will determine that "Select All" has been added to the right-click menu, and will delete "SelectAll.vbs" and the added registry value.

When you click "Select All" in the added menu, "SelectAll.vbs" will be executed and "Ctrl + A" will be automatically pressed to select all files.

2. Copy the existing "Select All" registry value and add it to the registry location related to the Explorer right-click menu.

Adding the registry value takes a long time, so I have prepared a batch file.

*If you add registry values ​​manually, be careful not to accidentally delete important values.

If you operate the registry incorrectly, it may cause problems such as the system being unable to start. Please make a backup in advance using system restore or similar, and proceed at your own risk.

To avoid panicking if your PC suddenly breaks down, it's a good idea to have a standard backup software to protect your important photos and data.

Registry key:

HKEY_CLASSES_ROOT\Directory\Background\shell\Windows.selectall

Create the value:

Value NameValue typeValue data
CanonicalNameREG_SZ{b33bf5af-76d5-4d10-93e7-d8e22e93798f}
CommandStateHandlerREG_SZ{3756e7f5-e514-4776-a32b-eb24bc1efe7a}
CommandStateSyncREG_SZ
DescriptionREG_SZ@ Shell32.dll,-31277
IconREG_SZimageres.dll,-5308
ImpliedSelectionModelREG_DWORD32 (decimal)
MUIVerbREG_SZ@ Shell32.dll,-31276

Registry key:

HKEY_CLASSES_ROOT\Directory\Background\shell\Windows.selectall\command

Create the value:

Value Name
Value type
Value data
DelegateExecuteREG_SZ{aa28fbc7-59f1-4c42-9fd8-ba2be27ea319}

Contents of the batch file:

@echo off

set RegKey=HKCR\Directory\Background\shell\Windows.selectall

reg query %RegKey% >NUL 2>&1
if %ERRORLEVEL% equ 0 (
    reg delete "%RegKey%" /f
    echo 右クリックメニューのすべて選択を削除しました。
    pause
    exit
) else (
    Reg add "%RegKey%" /v "CanonicalName" /t REG_SZ /d "{b33bf5af-76d5-4d10-93e7-d8e22e93798f}" /f
    Reg add "%RegKey%" /v "CommandStateHandler" /t REG_SZ /d "{3756e7f5-e514-4776-a32b-eb24bc1efe7a}" /f
    Reg add "%RegKey%" /v "CommandStateSync" /t REG_SZ /d "" /f
    Reg add "%RegKey%" /v "Description" /t REG_SZ /d "@shell32.dll,-31277" /f
    Reg add "%RegKey%" /v "Icon" /t REG_SZ /d "imageres.dll,-5308" /f
    Reg add "%RegKey%" /v "ImpliedSelectionModel" /t REG_DWORD /d "32" /f
    Reg add "%RegKey%" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-31276" /f
    Reg add "%RegKey%\command" /v "DelegateExecute" /t REG_SZ /d "{aa28fbc7-59f1-4c42-9fd8-ba2be27ea319}" /f
    echo 右クリックメニューにすべて選択を追加しました。
    pause
    exit
)






1. Create a new text file, copy and paste the above content, change the name to "Right-clickSelectAll.bat" and save it.

*Please save the file with the character code set to "ANSI" (to prevent Japanese characters from being garbled).

*If you are creating a batch file for the first time, please read the next page.

What is a batch file? How to create and run a batch file

How To Use

Right-click on the batch file "Right-clickSelectAll.bat" and click "Run as administrator" to display a command prompt (black window).

The batch file checks whether the right-click menu exists (whether the registry value exists or not), and if the menu does not exist, it adds the registry value and displays the message "Select All has been added to the right-click menu."

command prompt
command prompt

If the menu exists, the added registry value will be deleted and the message "Select All from the right-click menu has been removed" will be displayed.

command prompt
command prompt

The command prompt can be closed by pressing any key or the × button, so please check to see if the item has been added to the right-click menu.

If you found this article helpful, please share it on social media.

Person who wrote this article

Driven by questions arising from my daily PC use and the desire to "do more," I have been pursuing self-study in Windows since around 2008. I am sharing the "aha!" techniques and solutions I discovered through trial and error with the sole purpose of helping you in your PC life.

View profile

Comment:

To comment

[About submissions]
We welcome any questions or information regarding the content of the article.
However, please note that content unrelated to the purpose of the article, criticism of specific individuals or organizations, offensive language,Inappropriate wordsComments containing the above may be deleted or made private without notice at the discretion of the administrator.
Please note that spam may be automatically deleted by anti-spam measures.

CAPTCHA


table of contents