WIN7 operating platform gets administrator permission batch

  
WIN7 operating platform to obtain administrator rights batch
Open some files on the WIN7 operating platform, if you need administrator privileges to open. You can get administrator privileges by doing the following:
Create a batch register file. The file content is, the file suffix is ​​.reg. Then double-click on the file. Open the file you need to access. If you need administrator rights, select the file, right-click, select the administrator to get all permissions, then cmd will pop up, then you will find that cmd is executing the command. Don't worry, you are getting access. File permissions. Wait a little while, you can open the file you want to open. The following commands are useful.
[java]
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*shellrunas]
@="Administrator Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT*shellrunascommand]
@="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_ROOTexefileshellrunas2]
@="Administrator Ownership" Br>"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTexefileshellrunas2command]
@="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_ROOTDirectoryshellrunas]
@="Administrator Takes Ownership"
"NoWorkingDirec Tory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="cmd.exe /c takeown /f "%1" /r /dy && icacls "%1" /grant administrators :F /t"
"IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /dy && icacls "%1" /grant administrators:F /t"

Copyright © Windows knowledge All Rights Reserved