[英]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.我的 Windows 10 安装在运行一些通过 Microsoft Store 安装的应用程序时出现问题,以及运行在桌面上右键单击时显示在菜单中的 nvidia 控制面板项时出现问题。 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:当您从开始菜单中选择应用程序时,使用 nvidia 控制面板的右键单击菜单项,或转到
C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps
并双击其中的 .exe 文件之一,你会得到这样的错误:
[Window Title]
[窗口标题]
C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WinDbg_8wekyb3d8bbwe\\WinDbgX.exe
C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WinDbg_8wekyb3d8bbwe\\WinDbgX.exe
[Content] Windows cannot access the specified device, path, or file.
[内容] Windows 无法访问指定的设备、路径或文件。 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.同时,导航到安装目录中的实际 .exe 并双击它即可。 This includes the executable called by the nvidia right-click menu item.
这包括由 nvidia 右键单击菜单项调用的可执行文件。
Non-"WindowsApps" items in the Start Menu work normally.开始菜单中的非“WindowsApps”项目正常工作。
I have narrowed this down to some sort of inability to run AppExecLink
s (also known as "reparse points" or "execution aliases").我已将其范围缩小到某种无法运行
AppExecLink
的情况(也称为“重新分析点”或“执行别名”)。 I have created a minimal test case using WinDbg installed from Microsoft Store, and using Set-ExecutionAlias
from this blog post .我使用从 Microsoft Store 安装的 WinDbg 创建了一个最小的测试用例,并使用了这篇博文中的
Set-ExecutionAlias
。
Below I list some .exe files.下面我列出了一些 .exe 文件。 When viewed with
dir
, they are 0 kb files.使用
dir
查看时,它们是 0 kb 文件。 They're something similar to hardlinks, but they're called AppExecLink
s.它们类似于硬链接,但称为
AppExecLink
。 They're not the actual executables - they just point to where the final .exe is, and how to execute it.它们不是实际的可执行文件 - 它们只是指向最终 .exe 的位置以及如何执行它。 Don't be surprised by this.
不要对此感到惊讶。 Those are not hard links, or symbolic links, or .lnk files, or junction points.
这些不是硬链接、符号链接、.lnk 文件或连接点。 They're
AppExecLink
s.它们是
AppExecLink
。 The blog post mentioned above is a good intro into what an Execution Alias aka AppExecLink
is.上面提到的博客文章很好地介绍了执行别名又名
AppExecLink
是什么。
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.您可以在下面看到,只需将
AppType
从Desktop
更改为UWP1
就足以修复错误:应用程序执行时没有错误,就像我双击安装文件夹中的 .exe 文件一样。 However, the Microsoft Store installs the program with AppType
set to Desktop
, which results in this broken behavior.但是,Microsoft Store 安装该程序时
AppType
设置为Desktop
,这会导致这种损坏的行为。 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.因此,要么它不应该将其设置为
Desktop
而这就是坏掉的地方,要么Desktop
应该可以工作而这就是坏掉的地方。
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.所有文件在
Get-Acl
具有完全相同的输出,因此这不是能够执行文件C:\\Users\\user1\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.WinDbg_8wekyb3d8bbwe\\WinDbgX.exe
和其他文件的问题喜欢它。
How do I fix this behavior?如何解决此行为? Why do I not have permissions to run the
Desktop
app types?为什么我没有运行
Desktop
应用程序类型的权限? What could be preventing this user from executing the AppExecLink
s that are affected?什么可能阻止此用户执行受影响的
AppExecLink
?
Here are the Get-ExecutionAlias
outputs (they're all the same, except the last one changes AppType
from Desktop
to UWP1
):以下是
Get-ExecutionAlias
输出(它们都是相同的,除了最后一个将AppType
从Desktop
更改为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): Get-Acl
输出,供您仔细检查(它们都是相同的):
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.您可以尝试修复您的 APPX 程序。 Open PowerShell as admin and run the line below.
以管理员身份打开 PowerShell 并运行以下行。
Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.