News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Set RO attribute

Started by Magnum, August 31, 2010, 12:56:48 PM

Previous topic - Next topic

Magnum

I would like to be able to right click on a file and set the file attribute to Read only.

I tried this, but it isn't working.

REGEDIT4

[HKEY_CLASSES_ROOT\comfile\shell\Set_RO]
@="Set_RO_Attribute"
[HKEY_CLASSES_ROOT\comfile\shell\Set_RO\command]
@="\"%COMSPEC%" /C attrib +r \"%1\""
Have a great day,
                         Andy

MichaelW

Under Windows 2000 it works for me, without modifying the registry.
eschew obfuscation

Magnum

; set_ro.reg  To work on limited users, this must be run with the limited user temporarily set as an admin !!
;
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\shell]

[HKEY_CURRENT_USER\Software\Classes\*\shell\MakeRO]
@="Set Attribute To Read Only"

[HKEY_CURRENT_USER\Software\Classes\*\shell\MakeRO\command]

@=hex(2):25,00,43,00,4f,00,4d,00,53,00,50,00,45,00,43,00,25,00,20,00,2f,00,63,\

00,20,00,61,00,74,00,74,00,72,00,69,00,62,00,20,00,2b,00,72,00,20,00,22,00,\
    25,00,4c,00,22,00,00,00
Have a great day,
                         Andy