0
votes

I'm trying to convert my Win32 app from its MSI into UWP appx package using Desktop App Converter, so that I can update it in the Windows Store. Here's the steps.

When I downloaded the Windows_BaseImage_DAC_17134.wim file and tried to install it, I got this at the end (I'm not sure if it means anything):

enter image description here

Here's the same as a text:

VERBOSE: Removing any pre-existing NAT network
Get-NetNat : Invalid class
At C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\converter_util\ContainerNetwor
kSetup.ps1:158 char:24
+         $existingNat = Get-NetNat
+                        ~~~~~~~~~~
    + CategoryInfo          : MetadataError: (MSFT_NetNat:root/StandardCimv2/MSFT_NetNat) [Get-NetNat], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041010,Get-NetNat

Then during the conversion process (that worked many times before) I got this:

enter image description here

C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\shared
VERBOSE: An error occurred converting your application. Here is the full error record:
VERBOSE:

PowerShell Error Record:
Cannot remove item C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\shared: The process cannot access the
file 'C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\shared' because it is being used by another process.
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: The process cannot access the file
'C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\shared' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean
throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveFileSystemItem(FileSystemInfo fileSystemInfo, Boolean
force)
Inner Exception Stack Trace[0]
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean
throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at Microsoft.PowerShell.Commands.FileSystemProvider.RemoveFileSystemItem(FileSystemInfo fileSystemInfo, Boolean
force)
VERBOSE: The full error record is saved in the logs at C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\logs
C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1 : Cannot
remove item C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\shared: The process cannot access the file
'C:\DesktopAppConverter\2ca66a48-91ab-4885-93cf-c9d6c325f3b2\shared' because it is being used by another process.
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

Does anyone have any idea what all this means?

PS. All these error messages have nothing to do with my app.

2
Is your device a VM or on a physical machine?Breeze Liu - MSFT
@BreezeLiu-MSFT: A vm. Why?c00000fd
We have been tracking an issue with containers on RS4 VMs not fully cleaning up when they close. We do not yet have a root cause for this issue. It may be the same issue, the workaround for the you is either to use an RS3(16299) VM or an RS4 physical machine to convert.Breeze Liu - MSFT
@BreezeLiu-MSFT: Thanks for the follow-up. Can I use 16299 wim on a Win10 v.1803 (build 17134.167)? And if not, how can I downgrade it?c00000fd
I have escalated this issue to the related team. I will post it here once I have any update.Breeze Liu - MSFT

2 Answers

3
votes

I ran into the same issue and solved it by turning off "Real-time protection" in the "Virus & thread protection settings".

1
votes

You can turn off real-time monitoring of Windows Defender using the following command in PowerShell: Set-MpPreference -DisableRealtimeMonitoring $true

To enable the real-time monitoring again: Set-MpPreference -DisableRealtimeMonitoring $false

I prefer this because it's not always good to permanently disable antivirus protection. btw, got this solution from this article.