You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows Bridge桌面版进程清理失败,寻求高级技术解决方案

高级解决方案:Desktop App Converter进程占用无法清理Shared文件夹

作为使用Windows Bridge超过2年的老用户,我遇到过好几次这个顽固的进程占用问题,给你几个亲测有效的高级排查和修复步骤:

1. 精准定位并终止占用进程

首先要找出到底是哪个进程在占用shared文件夹,推荐用Windows Sysinternals的Handle工具(微软官方工具,无需第三方软件):

  • 打开管理员命令提示符,运行:
    handle.exe C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared
    
  • 输出结果里会显示占用该文件夹的进程PID和名称,比如vmwp.exe(虚拟机进程)或converter_util.exe之类的。
  • 用强制终止命令结束进程:
    taskkill /PID [找到的PID] /F
    

如果Handle工具没找到,试试用Process Explorer(同样是Sysinternals工具),搜索该文件夹路径,直接右键结束关联进程。

2. 清理DAC隔离环境残留进程

Desktop App Converter会用到虚拟机或容器环境,有时候这些环境的后台进程没彻底关闭:

  • 打开任务管理器,切换到「详细信息」标签,查找vmwp.exe(Hyper-V虚拟机进程)、wsl.exe(如果用了WSL后端)或者名称包含DesktopAppConverter的进程,全部强制结束。
  • 也可以用PowerShell批量筛选并终止:
    Get-Process | Where-Object {$_.Name -match "vmwp|DesktopAppConverter|converter"} | Stop-Process -Force
    

3. 修改DAC脚本增强删除逻辑

日志里报错的位置在IsolatedEnvironmentOps.ps1的第221行,我们可以修改这个脚本的删除逻辑,让它更“强硬”:

  • 找到路径C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\converter_util\IsolatedEnvironmentOps.ps1
  • 打开文件找到Invoke-IsolatedInstall函数里的删除代码(对应报错行),把原来的Remove-Item命令改成:
    Remove-Item -Path "C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared" -Recurse -Force -Confirm:$false -ErrorAction Ignore
    
    或者在删除前先尝试卸载可能挂载的VHD文件(如果存在的话):
    $vhdPath = Get-ChildItem -Path "C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c" -Filter *.vhdx | Select-Object -First 1
    if ($vhdPath) {
        Dismount-VHD -Path $vhdPath.FullName -Force
    }
    Remove-Item -Path "C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared" -Recurse -Force
    

4. 重置DAC缓存后重新转换

如果以上步骤都没解决,手动清理缓存并重置:

  • 先结束所有DAC相关进程(参考步骤2)
  • 手动删除整个C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c文件夹(如果还是删不掉,重启电脑后再删)
  • 运行PowerShell命令重置DAC缓存:
    & 'C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1' -ResetCache
    
  • 之后重新尝试应用转换。

附上您提供的错误日志:

VERBOSE: An error occurred converting your application. Here is the full error record: VERBOSE: PowerShell Error Record: Cannot remove item C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared: Proces nie może uzyskać dostępu do pliku „C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared”, ponieważ jest on używany przez inny proces. PowerShell Stack Trace: at Invoke-IsolatedInstall, C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\converter_util\IsolatedEnvironmentOps.ps1: line 221 at <ScriptBlock><Process>, C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1: line 679 at <ScriptBlock>, <No file>: line 1 Inner Exception[0]: System.IO.IOException: Proces nie może uzyskać dostępu do pliku „C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared”, ponieważ jest on używany przez inny proces. w System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) w System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) w System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) w Microsoft.PowerShell.Commands.FileSystemProvider.RemoveFileSystemItem(FileSystemInfo fileSystemInfo, Boolean force) Inner Exception Stack Trace[0] w System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) w System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) w System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) w Microsoft.PowerShell.Commands.FileSystemProvider.RemoveFileSystemItem(FileSystemInfo fileSystemInfo, Boolean force) VERBOSE: The full error record is saved in the logs at C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\logs C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1 : Cannot remove item C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared: Proces nie może uzyskać dostępu do plik u „C:\DesktopAppConverter\21c0f04c-4eea-4f98-912b-9a47a3b0a91c\shared”, ponieważ jest on używany przez inny proces. At line:1 char:1 + &'C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DesktopAppConverter.ps1

内容的提问来源于stack exchange,提问作者Włodzimierz O. Kubera

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 08:01:42