Sometimes the file cannot be deleted in win7win8. When a window pops up, the system prompts that a certain permission is required. The solution is as follows:
Quickly obtain the highest permissions in a normal account:
Create a new TXT file, copy and paste the following code to the file, save it as or rename it as a. reg file, double-click the file, or right-click to merge the file.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT \ * \ shell \ runas] @ = "one-click super administrator permission" "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] @ =" one-click super administrator permission "" 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] @ =" one-click super administrator permission "" 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 "Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT \ * \ shell \ runas] @ =" one-click super administrator permission "" 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 ownership "" 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] @ =" one-click super administrator permission "" 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"
Right-click a file or folder to which you want to obtain all permissions. With one-click super administrator permission, you can quickly obtain the highest permissions in a common administrator account.
After obtaining the permission, run the program again, which is the same as running in the super administrator account.
Another case is that a program is operating on this file and the file cannot be deleted. Enable the task manager to end all processes of the program and then try to delete the file again.
Enable Administrator Account: Run gpedit. msc -- computer configuration -- Windows Settings -- security settings -- local policy -- security options -- account: Administrator Account Status -- double-click to open properties -- enable -- OK.