tags: Personal record
I have found a lot of example, some said that I have stopped Oracle service to delete an Oracle registry, I tried no matter whether it allows me to get administrator privileges, so I will get administrator privileges, but still can't work, but also Adding a group member local security, and finally I found this method, I still use it. (Here is a note, I am afraid it will be used later)
Create a TXT document to copy the following code into and save the modified extensionregFormat
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Get Administrator Rights"
"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 Administrator Rights"
"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 Administrator Rights"
"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"
Then run, and then you need a file or folder where administrator privileges before re-deleting.
@echo off
pushd "%~dp0"
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"
pause
ReplicationcmdIt's okay.
Help! ! win10 deletes a prompt window for a file But when I went to the security of the file - the advanced interface was found There is no way to add or delete The owner is S-1-5-21XXXX inherited or ...
When deleting some system files, you will encounter some problems that require permissions, as shown in the following figure Sometimes using the cmd del command does not succeed, but the actual file i...
File management on win10 sometimes requires administrator privileges, even when the administrator runs the terminal, the following is the solution. 1. win+R inputgpedit.mscEnter Group Policy. But some...
http://www.xujiahua.com/5324.html Today I copied some files from the USB flash drive to the local computer, and then the system prompted: "You need to provide administrator permissions to copy to...
Code: end...
Precondition: Some files have been transferred from another computer, but the video files cannot be used, so I want to delete these video files in batches....
Delete the folder instance: rm -rf /var/log/httpd will force the deletion of the httpd folder Delete file usage examples: rm -f /var/log/httpd/access.lo...