Personalization Add Read-only Context Menu to Files and Folders in Windows 11


  • Staff
Read-only_banner.png

This tutorial will show you how to add a Read-only context menu to files and folders for all users in Windows 10 and Windows 11.

You can apply or clear the read-only attribute for files and folders in Windows 10/11.

When setting a folder as read-only, read-only is actually only applied to all files in the folder and subfolders instead. The folder itself will not be read-only.

When a file is set to be read-only, write permissions are removed. This prevents the file from being edited or modified. For example, any edits to a read-only text file will have to be saved as a new file.

read-only_text_file.png

You will still be able to delete a read-only file.

If you like, you can add a Read-only context menu to files and folders to make it easier to set and clear the read-only attribute for one or more selected file(s) or folder(s) without having to go through Properties.

While you must be signed in as an administrator to add or remove the Read-only context menu, all users can use the context menu.



EXAMPLE: "Read-only" context menu

In Windows 11, it is required to click/tap on Show more options first by default, then click/tap on Read-only.


Show_more_options.png
Read-only_file_context_menu.png
Read-only_folder_context_menu.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add "Read-only" context menu for all users

A) Click/tap on the Download button below to download the REG file below, and go to step 4 below.​

Add_Read-only_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Read-only]
"MUIVerb"="Read-only"
"Icon"="imageres.dll,-1027"
"SubCommands"=""

[HKEY_CLASSES_ROOT\*\shell\Read-only\shell\001menu]
"CommandFlags"=dword:00000020
"MUIVerb"="Apply read-only to selected file(s)"

[HKEY_CLASSES_ROOT\*\shell\Read-only\shell\001menu\command]
@="attrib +r \"%1\""

[HKEY_CLASSES_ROOT\*\shell\Read-only\shell\002menu]
"MUIVerb"="Clear read-only for selected file(s)"

[HKEY_CLASSES_ROOT\*\shell\Read-only\shell\002menu\command]
@="attrib -r \"%1\""


[HKEY_CLASSES_ROOT\Directory\shell\Read-only]
"MUIVerb"="Read-only"
"Icon"="imageres.dll,-1027"
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\shell\Read-only\shell\001menu]
"CommandFlags"=dword:00000020
"MUIVerb"="Apply read-only to selected folder(s), subfolders and files"

[HKEY_CLASSES_ROOT\Directory\shell\Read-only\shell\001menu\command]
@="cmd /c attrib +r \"%1\" & attrib +r \"%1\\*.*\" /s /d"

[HKEY_CLASSES_ROOT\Directory\shell\Read-only\shell\002menu]
"MUIVerb"="Clear read-only from selected folder(s), subfolders and files"

[HKEY_CLASSES_ROOT\Directory\shell\Read-only\shell\002menu\command]
@="cmd /c attrib -r \"%1\" & attrib -r \"%1\\*.*\" /s /d"

3 Remove "Read-only" context menu for all users

This is the default setting.


A) Click/tap on the Download button below to download the REG file below, and go to step 4 below.​

Remove_Read-0nly_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\Read-only]

[-HKEY_CLASSES_ROOT\Directory\shell\Read-only]

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

  • Add_Read-only_context_menu.reg
    1.4 KB · Views: 61
  • Remove_Read-0nly_context_menu.reg
    297 bytes · Views: 50
Last edited:
This is going to be so useful, thank you very much, Shawn 🙏
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build: 22631.4112
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22621.3958
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom