Windows Registry Editor Version 5.00
; Get File Modification permission
[Hkey_classes_root\*\shell\runas]
@= "Administrator Rights"
"Icon" = "c:\\windows\\system32\\imageres.dll,102"
"Noworkingdirectory" = ""
[Hkey_classes_root\*\shell\runas\command]
@= "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
"Isolatedcommand" = "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
[HKEY_CLASSES_ROOT\EXEFILE\SHELL\RUNAS2]
@= "Administrator Rights"
"Icon" = "c:\\windows\\system32\\imageres.dll,102"
"Noworkingdirectory" = ""
[Hkey_classes_root\exefile\shell\runas2\command]
@= "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
"Isolatedcommand" = "cmd.exe/c takeown/f \"%1\ "&& icacls \"%1\ "/grant administrators:f"
[Hkey_classes_root\directory\shell\runas]
@= "Administrator Rights"
"Icon" = "c:\\windows\\system32\\imageres.dll,102"
"Noworkingdirectory" = ""
[Hkey_classes_root\directory\shell\runas\command]
@= "cmd.exe/c takeown/f \"%1\ "/r/d y && icacls \"%1\ "/grant administrators:f/T"
"Isolatedcommand" = "cmd.exe/c takeown/f \"%1\ "/r/d y && icacls \"%1\ "/grant administrators:f/T"
I used it today, recorded it.
Get Host File permissions Registry import