Run with administrative permission issue

纵然是瞬间 提交于 2020-01-29 10:11:11

问题


I am using Windows Vista and I find something strange,

  1. I programatically invoke IE to open IE to access some local html page, the current user belongs to administrator group;

  2. I programatically invoke IE with RunAs parameter, and let IE to access access some local html page, the current user belongs to administrator group;

I find (1) and (2) sometimes have different results (page content), especially when there is ActiveX or Silverlight plug-in in the local page.

My confusion is, if the current user belongs to Administrator Group, it should not matter whether we use RunAs parameter. Why still different with and without RunAs parameter even current user belongs to administrator group?

thanks in advance, George


回答1:


Even when the user is in the Administators group, they won't be able to undertake privileged operations without an application requesting elevation via a UAC prompt.

Hence the availability of the right-click, "run as administrator" context menu item.

Here is some documentation on UAC from Microsoft. It contains the following:

After an administrator logs on, the full administrator access token is not invoked until the user attempts to perform an administrative task.

An administrative task is defined as a task that requires elevation (indicated by a Vista "shield" over the icon for the application).

However, I am not sure how you might programatically invoke Internet Explorer "pre"-elevated, nor if this is the proper solution to your problem.



来源:https://stackoverflow.com/questions/1130230/run-with-administrative-permission-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!