简体   繁体   中英

Windows 10 user unable to execute AppExecLink reparse point .exe files

My installation of Windows 10 has problems running some apps that have been installed via the Microsoft Store, as well as running the nvidia control panel item which shows up in the menu when you right click on the desktop. When you select the app from the start menu, use the right click menu item for the nvidia control panel, or go to C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps and double click one of the .exe files there, you get this kind of error:

[Window Title]

C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WinDbg_8wekyb3d8bbwe\\WinDbgX.exe

[Content] Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.
[OK]

Meanwhile, navigating to the actual .exe in the installation directory, and double-clicking it, works. This includes the executable called by the nvidia right-click menu item.

Non-"WindowsApps" items in the Start Menu work normally.

I have narrowed this down to some sort of inability to run AppExecLink s (also known as "reparse points" or "execution aliases"). I have created a minimal test case using WinDbg installed from Microsoft Store, and using Set-ExecutionAlias from this blog post .

Below I list some .exe files. When viewed with dir , they are 0 kb files. They're something similar to hardlinks, but they're called AppExecLink s. They're not the actual executables - they just point to where the final .exe is, and how to execute it. Don't be surprised by this. Those are not hard links, or symbolic links, or .lnk files, or junction points. They're AppExecLink s. The blog post mentioned above is a good intro into what an Execution Alias aka AppExecLink is.

Below you can see that simply changing the AppType from Desktop to UWP1 is enough to fix the error: the application executes with no error, just like when i double-click the .exe file from its installation folder. However, the Microsoft Store installs the program with AppType set to Desktop , which results in this broken behavior. So either it should not be setting it to Desktop and that's what is broken, or Desktop should work and that's what's broken.

All files have exactly the same output in Get-Acl , so this isn't an issue of being able to execute the file C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WinDbg_8wekyb3d8bbwe\\WinDbgX.exe and others like it.

How do I fix this behavior? Why do I not have permissions to run the Desktop app types? What could be preventing this user from executing the AppExecLink s that are affected?


Here are the Get-ExecutionAlias outputs (they're all the same, except the last one changes AppType from Desktop to UWP1 ):

Created by Microsoft Store, broken:
PS C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe> Get-ExecutionAlias .\WinDbgX.exe


Version         : 3
PackageName     : Microsoft.WinDbg_8wekyb3d8bbwe
EntryPoint      : Microsoft.WinDbg_8wekyb3d8bbwe!Microsoft.WinDbg
Target          : C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\DbgX.Shell.exe
AppType         : Desktop
Flags           : 48
Tag             : APPEXECLINK
IsMicrosoft     : True
IsNameSurrogate : False
IsTagDirectory  : False


Created by me, broken:
PS C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe> Get-ExecutionAlias .\windbg5.exe


Version         : 3
PackageName     : Microsoft.WinDbg_8wekyb3d8bbwe
EntryPoint      : Microsoft.WinDbg_8wekyb3d8bbwe!Microsoft.WinDbg
Target          : C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\DbgX.Shell.exe
AppType         : Desktop
Flags           : 48
Tag             : APPEXECLINK
IsMicrosoft     : True
IsNameSurrogate : False
IsTagDirectory  : False


Created by me, works:
PS C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe> Get-ExecutionAlias .\windbg6.exe


Version         : 3
PackageName     : Microsoft.WinDbg_8wekyb3d8bbwe
EntryPoint      : Microsoft.WinDbg_8wekyb3d8bbwe!Microsoft.WinDbg
Target          : C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\DbgX.Shell.exe
AppType         : UWP1
Flags           : 49
Tag             : APPEXECLINK
IsMicrosoft     : True
IsNameSurrogate : False
IsTagDirectory  : False

Get-Acl outputs, for your scrutiny (they're all the same):

PS C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe> Get-Acl .\WinDbgX.exe | fl


Path   : Microsoft.PowerShell.Core\FileSystem::C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe\WinDbgX.exe
Owner  : BUILTIN\Administrators
Group  : GAMING\user1
Access : NT AUTHORITY\SYSTEM Allow  FullControl
         BUILTIN\Administrators Allow  FullControl
         GAMING\user1 Allow  FullControl
         GAMING\TempAdmin2 Allow  FullControl
Audit  :
Sddl   : O:BAG:S-1-5-21-1777315463-2770185252-2942861946-1001D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1777315463-2770185252-2942861946-1001)(A;ID;FA;;;S-1-5-21-1777315463-2770185252-2942861946-1006)



PS C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe> Get-Acl .\windbg5.exe | fl


Path   : Microsoft.PowerShell.Core\FileSystem::C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe\windbg5.exe
Owner  : BUILTIN\Administrators
Group  : GAMING\user1
Access : NT AUTHORITY\SYSTEM Allow  FullControl
         BUILTIN\Administrators Allow  FullControl
         GAMING\user1 Allow  FullControl
         GAMING\TempAdmin2 Allow  FullControl
Audit  :
Sddl   : O:BAG:S-1-5-21-1777315463-2770185252-2942861946-1001D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1777315463-2770185252-2942861946-1001)(A;ID;FA;;;S-1-5-21-1777315463-2770185252-2942861946-1006)



PS C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe> Get-Acl .\windbg6.exe | fl


Path   : Microsoft.PowerShell.Core\FileSystem::C:\users\user1\AppData\Local\Microsoft\WindowsApps\Microsoft.WinDbg_8wekyb3d8bbwe\windbg6.exe
Owner  : BUILTIN\Administrators
Group  : GAMING\user1
Access : NT AUTHORITY\SYSTEM Allow  FullControl
         BUILTIN\Administrators Allow  FullControl
         GAMING\user1 Allow  FullControl
         GAMING\TempAdmin2 Allow  FullControl
Audit  :
Sddl   : O:BAG:S-1-5-21-1777315463-2770185252-2942861946-1001D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-1777315463-2770185252-2942861946-1001)(A;ID;FA;;;S-1-5-21-1777315463-2770185252-2942861946-1006)

You can try to repair your APPX program. Open PowerShell as admin and run the line below.

Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM