欢迎来到我的博客

您需要administrators提供的权限才能对此文件进行更改

您需要administrators提供的权限才能对此文件进行更改

1‘问题

无法更改之前系统下创建的文件,提示:您需要administrators提供的权限才能对此文件进行更改。

2.解决方法

打开记事本复制下面内容

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\shell\runas]
@="管理员取得所有权"
"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]
@="管理员取得所有权"
"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]
@="管理员取得所有权"
"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"

然后另存为获取管理员权限.reg(后缀名必须是 .reg,系统默认设置是不显示扩展名的,请到文件夹先项里先更改成显示扩展名)
双击另存成的注册表文件将信息导入注册表,这样在文件夹上单击右键就会出现 “管理员取得所有权”,在驱动器根目录下的文件夹上右击-管理员取得所有权,即可快速可靠的取得所有权,然后就可以随便操作文件了。

3.联系方式:

qq:2061302791

微信:xie2061302791

电话:15284524485

个人网站:https://xieyingpeng.github.io/

Github:https://github.com/xieyingpeng/

博客园:https://www.cnblogs.com/Xieyingpengz

知乎:https://www.zhihu.com/people/nan-qiao-12-73

gitee:https://gitee.com/xie-yingpeng/project-1.git

bilibili:https://space.bilibili.com/617198338?share_medium=android&share_source=copy_link&bbid=XY2BDF522C748A159BE7DD354D6DFFB963728&ts=1612520115798

posted @ 2021-04-27 11:32  XieYingpeng  阅读(4500)  评论(1编辑  收藏  举报