Run with administrative permission issue

2019-02-16 05:39发布

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条回答
ら.Afraid
2楼-- · 2019-02-16 06:08

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.

查看更多
登录 后发表回答