Win7:在管理模式下启动 Windows 资源管理器与在管理模式下启动 cmd.exe 有什么区别?
我目前使用的是VB-Skript,它用于启动setup.exe文件,该文件需要管理权限才能正确安装,如果不以管理员身份启动它将返回相应的错误消息。脚本和安装程序均位于 Windows 7(32 位)中分类为“Worokplace”的网络中的窗口共享上。
我有以下奇怪的效果,我不明白:
我以“管理员”身份运行 explorer.exe,并通过双击启动脚本,这会导致最终的错误消息:setup.exe 需要管理权限才能运行。我认为当我以管理员身份运行 explorer.exe 时,其中启动的所有其他进程都将具有相同的权限。
我通过以管理员身份启动 cmd.exe 进行了相同的尝试,只需键入 myscript.vbs 即可运行 vbs,安装成功。
显然,同一个脚本从具有管理权限的explorer启动和从具有管理权限的cmd.exe启动最终获得了不同的权限,这是我完全不明白的。有人可以解释一下那里发生了什么事吗?
多谢
I am currently using a VB-Skript, which is used to start a setup.exe file, which requires administrative privilleges in order to be installed correctly, if it is not started as an administrator it will return a corresponding error message. Both the script and the setup are located on a window share that is located in a network classified as "Worokplace" in Win7 (32 Bit).
I have the foloowing strange effect, which I do not understand:
I run explorer.exe as "Administrator", and start the script by doubleclicking, which results in a final errormessage that setup.exe requires administrative privileges in order to run. I thought that when I run explorer.exe as Administrator, all other processes started within will have the same privileges.
I tried the same by starting cmd.exe as an Administrator, run the vbs by simply typing myscript.vbs, and the installation succeeds.
Obviously, the same script started from explorer with administrative rights and started from cmd.exe with administrative right finally gets different privilleges, which is what I do not understand at all. Can anybody please explain what's going on there?
Thanks alot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
任何进程都可以启动子进程,父进程可以选择子进程运行在什么环境(包括访问权限)。区别很简单,cmd.exe允许子进程继承自己的环境,而explorer.exe则仅在被告知时才应用管理员权限,方法是右键单击并“以管理员身份运行”或编辑快捷方式的属性。
底线很简单,它们就是这样编码的。
Any process can start a child process, and the parent process can choose what environment (including access rights) the child process will run in. The difference is simply that cmd.exe allows child processes to inherit its own environment, while explorer.exe will only apply administrator privileges if it has been told to do so, either by right-click and 'Run as administrator' or by editing the properties of a shortcut.
The bottom line is simply that they are coded that way.