Win7 Open file prompts require administrator privileges to open the solution

  
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.
Copy Code
The code is as follows:
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"< Br>"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
[HKEY_CLASSES_ROOTexefileshellrunas2]
@=" ; administrator takes ownership "
"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 Ownership""NoWorkingDirectory"=""
[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