a simple line of AHK command would clear it all
FileSetAttrib, Attributes [, FilePattern, OperateOnFolders?, Recurse?]
My script extends the facility to Windows Explorer's Context Menu
A Screen shot of Windows Explorer's Context Menu Image: 640x480 13.2KB

1) Script will run only as an executable. Compile this code before attempting execution.
2) Run the executable once (without any parameter(s)), and it adds entries in Windows Registry, enabling a menu-item in right-click Context Menu of Windows Explorer. Also, it creates a shortcut to remove the Registry Entries made by the script
3) Registry entry will be pointing to the folder from where you executed the .EXE. You have to execute the .EXE again if you move it to a different location.
4) Tested the Script in Windows 98 SE and Windows XP Pro and it works fine.
Here follows the 90x90
FolderName=%1%
#NoTrayIcon
#SingleInstance off
if A_IsCompiled != 1
{
MsgBox,16,Error: %A_ScriptName%
,Compile "%A_ScriptName%" into an Executable,10
GoSub,Exitt
}
if FolderName=
GoSub,AddRegEntries
If FolderName= /UnInstall
GoSub,UnInstall
IfNotExist,%FolderName%
GoSub,Exitt
StringRight,LastChar,FolderName,1
if LastChar != \
FolderName=%FolderName%\
Files=%FolderName%*.*
FileSetAttrib,-R,%Files%,1,1
ControlSetText , msctls_statusbar321, Read-Only Removed,A
Tooltip,ReadOnly Attribute removed for`n%Files%
Sleep,3000
Tooltip
return
; ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~
AddRegEntries:
RegCommand="%A_ScriptFullPath%" "`%1`%"
RegRead, EntryInRegistry, HKEY_CLASSES_ROOT, Folder\Shell\Remove ReadOnly\Command
L1=Open Windows Explorer, Right-click on any folder and
L2=select "Remove Read-Only Attribute"
L3=Entire Folder contents [including Sub-folders and
L4=its contents] will be flagged READ/WRITE
L5= UnInstall: %A_ScriptName% /UnInstall
if RegCommand != %EntryInRegistry%
{
L0=%A_ScriptName%: Added Entries to Windows Registry
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, Folder\Shell\Remove ReadOnly
,, Remove Read-Only Attribute
RegWrite, REG_SZ, HKEY_CLASSES_ROOT, Folder\Shell\Remove ReadOnly\Command
,,"%A_ScriptFullPath%" "`%1`%"
if ErrorLevel != 1
msgbox,64,%L0%,%L1%`n%L2%`n`n%L3%`n%L4%`n`n%L5%
else
Msgbox,64,%A_ScriptName%: Error!
,Unable to Add Entries to Windows Registry!
FileCreateShortcut, %A_ScriptFullPath%
,%A_ScriptDir%\Remove Registry Entries [added by %A_ScriptName%].LNK
, %A_ScriptDir%
, /UnInstall
}
else
msgbox,48,%A_ScriptName%: Already Installed,%L1%`n%L2%`n`n%L3%`n%L4%`n`n%L5%
GoSub,Exitt
return
; ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~
UnInstall:
RegDelete, HKEY_CLASSES_ROOT, Folder\Shell\Remove ReadOnly
FileRecycle,%A_ScriptDir%\Remove Registry Entries [added by %A_ScriptName%].LNK
if ErrorLevel != 0
{
L0=%A_ScriptName%: Error!
L1=Unable to Remove Entries from Windows Registry!
}
else
{
L0=%A_ScriptName%: Removed Entries from Windows Registry
L1=You can safely delete "%A_ScriptName%" now!
L2=Execute "%A_ScriptName%" again to ReInstall
}
msgbox,64,%L0%,%L1%`n%L2%
return
; ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~
Exitt:
ExitApp
return
; ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~ ~.'.~
;Script Written by Goyyah [2006-01-15], Last Modified [ 2006-01-17 ]Post your Comments/Suggestions




