Save the following text in Notepad as a reg file and import it:
Windows Registry Editor Version 5.00
[Hkey_classes_root \ * \ shell \ RunAs]
@ = "Get admin right"
"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]
@ = "Get admin right"
"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]
@ = "Get admin right"
"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"