How to delete a folder that requires administrator permission under win7
Copy the following content to the TXT file and change the suffix of the TXT file to. Reg.
Double-click the reg file and add it to the Registry.
Right-click "Administrator authorization" on the folder to be deleted, and select "delete folder!
------------------------------
Windows Registry Editor Version 5.00
[Hkey_classes_root \ * \ shell \ RunAs]
@ = "Administrator authorization"
"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 authorization"
"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 authorization"
"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"