Win7 获得管理员权限 方法 1. 把下面的一段代码拷贝到一个txt文件中(administrator.txt) 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" 2. .txt (administrator.txt) 改名为 .reg(administrator.reg) 3. 双击运行 administrator.reg 4. 在想要获得权限的文件夹上右键->管理员取得所有权 5. Ok了