Why does the error "(app name) can't open while File Explorer is running with administrator privileges" occur?

12,221

I faced this error myself some time back and looked into it a bit, and here's what I have understood about the cause. If any Windows programming expert sees any egregious mistakes, kindly edit and improve.

Windows 8 and the introduction of the new Metro/Modern UI and apps necessitated several enhancements to the OS' security model. AppContainer is a new isolation method applied to Metro apps, which by default prevents them from both reading and writing to most of the Operating System, with the exception of the app’s own AppData folder.

Metro applications can make declarations in their application manifest file about which OS capabilities they need to access. You can read a bit more about this in the Delivering reliable and trustworthy Metro style apps article on the Building Windows 8 blog.

AppContainer is implemented through a new integrity level in Windows 8, supported by some additional changes to the OS. The AppContainer integrity level blocks both read and write access to objects marked with a higher integrity level. Now Windows Explorer normally runs in medium integrity mode, and explorer.exe is the parent process from which all other user-initiated processes inherit their access token. If Explorer is running with admin privileges i.e. at high integrity level, then any Metro apps it launches will inherit that administrative access token, which is obviously a strict no-no as it will violate the sandboxed environment provided by the AppContainer integrity level. Hence the error message thrown.

Share:
12,221

Related videos on Youtube

Thomas Levesque
Author by

Thomas Levesque

I'm a French C# developer from Paris. I work mostly on ASP.NET Core projects. I'm a Microsoft MVP (Development technologies) since 2012.

Updated on September 18, 2022

Comments

  • Thomas Levesque
    Thomas Levesque over 1 year

    I'm getting this message when I try to start a Modern UI app after explorer was restarted with admin privileges (by a setup program).

    I know how to fix it (just restart explorer without admin privileges), but I'm curious: Why is it forbidden to run a metro app with explorer running with admin privileges? I can't think of any good reason.

    • Admin
      Admin over 11 years
      @OliverSalzburg, if you edit my question, please don't change its meaning...
    • Admin
      Admin over 11 years
      I guess it is because Apps keep preferences for your users in your Windows 8 PC, and admin is not a proper user for those application since they don't need admin adjustments. Besides, some users might be using their Microsoft accounts and Windows 8 applications are installed for each user.
  • Thomas Levesque
    Thomas Levesque over 11 years
    Thanks for your answer. Are you sure that it's explorer.exe that creates the process for Metro apps? It doesn't seem very logical, since they're not started from the explorer...
  • Thomas Levesque
    Thomas Levesque over 11 years
    Unless, of course, the start screen is part of explorer.exe ...
  • Karan
    Karan over 11 years
    I think it is, but I'm not sure.