如何使用 RunAs Cmd 启动资源管理器,Windows 8
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22451594/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use RunAs Cmd to Launch Explorer, Windows 8
提问by johny why
any idea why this is not working?
知道为什么这不起作用吗?
runas.exe /user:Administrator "cmd /c explorer"
it returns:
它返回:
Windows cannot find the specified file. You may not have appropriate permissions.
Windows 找不到指定的文件。您可能没有适当的权限。
the following works by itself:
以下工作本身:
cmd /c explorer
thx!
谢谢!
回答by johny why
Answer found here http://winaero.com/blog/how-to-run-explorer-as-administrator-on-windows-8-1-windows-8-and-windows-7/
在这里找到答案 http://winaero.com/blog/how-to-run-explorer-as-administrator-on-windows-8-1-windows-8-and-windows-7/
"Microsoft does not allow running Explorer as administrator in Windows 8.1/8 (and in Windows 7 too). The solution to run Explorer elevated...
“Microsoft 不允许在 Windows 8.1/8(以及 Windows 7)中以管理员身份运行资源管理器。运行资源管理器的解决方案提升...
1- take ownership of registry key below.
1- 取得以下注册表项的所有权。
- Right-click, Permissions, Advanced, Owner Change
- or, Use Winaero's RegOwnershipEx application, which allows you to take ownership of registry keys
- 右键单击,权限,高级,所有者更改
- 或者,使用 Winaero 的 RegOwnershipEx 应用程序,它允许您取得注册表项的所有权
HKEY_CLASSES_ROOT\AppID{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
HKEY_CLASSES_ROOT\AppID{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
2- rename or delete the value named 'RunAs'.
2- 重命名或删除名为“RunAs”的值。
3- now Restore Ownership (this failed for me done manually-- i could not re-add TrustedInstaller --user not found).
3- 现在恢复所有权(这对我手动完成失败了 - 我无法重新添加 TrustedInstaller - 找不到用户)。
4- at this point, you will be able to run explorer as admin
4-此时,您将能够以管理员身份运行资源管理器
5- this process does not cleanly exit when you close the Explorer window! You must remember to terminate it every time you elevate Explorer after you are done working in the Explorer window.
5- 当您关闭资源管理器窗口时,此过程不会完全退出!在 Explorer 窗口中完成工作后,您必须记住每次提升 Explorer 时都要终止它。
Alternate solution: use Winaero's ELE.exe app to start any program as administrator from the command line.
替代解决方案:使用 Winaero 的 ELE.exe 应用程序从命令行以管理员身份启动任何程序。
回答by Mike Cave
Usually one wants to run as an Administrator to edit a file, or get permissions to delete a file:
通常希望以管理员身份运行以编辑文件,或获得删除文件的权限:
To get to the permissions on a file you can right click on it and select Properties. Then select Security. You will see this dialog:
要获得文件的权限,您可以右键单击它并选择“属性”。然后选择安全。您将看到此对话框:
Then Click on Edit and change the permissions for the relevant user (e.g Mike). You need to have admin privileges to do this, which can be set via User Account Control.
然后单击编辑并更改相关用户(例如迈克)的权限。您需要具有管理员权限才能执行此操作,这可以通过用户帐户控制进行设置。
The File Permissions window looks like this:
文件权限窗口如下所示:
Edit as required.
根据需要进行编辑。
I have admin rights but Windows 8.1 still protects some system files (such as the Android studio.exe.vmoptions) and I used the above method to give me write access to the file.
我有管理员权限,但 Windows 8.1 仍然保护一些系统文件(例如 Android studio.exe.vmoptions),我使用上述方法授予我对该文件的写访问权限。
Hope this helps.
希望这可以帮助。
回答by ISUadmin
You could always open a dos prompt as Administrator then go to the directory in question then do a Explorer . then it will open the location in question as the elevated user.
您始终可以以管理员身份打开 dos 提示,然后转到相关目录,然后执行 Explorer。然后它将以提升的用户身份打开有问题的位置。