OneDrive file attachment error in AVD RemoteApp

When attaching/inserting/uploading OneDrive files in an AVD RemoteApp, you may receive this error message:

Error 0x80070057: The parameter is incorrect. An unexpected error is keeping you from coping the file.
 


Reason:

The Desktop Change Router controls how Windows handles certain desktop environment changes, specifically related to the user interface. By default, Windows uses the Desktop Change Router to manage changes in desktop configurations.

The Desktop Change Router can cause problems, like the above error message, when applications attempt to interact with each other outside of a full AVD Desktop session, such as an AVD RemoteApp session. This is because the Desktop Change Router may attempt to control how Windows interacts with the RemoteApp differently to other applications that are also installed on the same AVD virtual machine.

Example:

Our problem app, the Cherwell Service Management application, when run as an AVD RemoteApp, receives the above error message when trying to attach a file that is in OneDrive and where the file has not yet been synced locally on the AVD virtual machine. This is common where OneDrive is configured to use Files on Demand. The attempt to attach the file automatically triggers OneDrive to download the file locally. Once the file has downloaded, the user can then click Try Again then the file will successfully attach.

In this example, the Desktop Change Router is managing the Cherwell application and OneDrive differently. It is not allowing the Cherwell RemoteApp to properly interact with OneDrive - normally if an application attempts to interact with a cloud file in OneDrive it will wait for OneDrive to download the file locally before proceeding with the interaction, but because the Desktop Change Router is managing the Cherwell RemoteApp and OneDrive differently it is allowing the Cherwell RemoteApp to continue the file interaction without waiting for OneDrive to complete the file download. This results in an error when trying to attach the file.
 


Solution:

To resolve this issue for a RemoteApp, you need to configure the registry on the AVD virtual machine so that the Desktop Change Router is excluded from managing that RemoteApp’s application EXE file and File Explorer, then restart the virtual machine.

Exclude File Explorer:

  • Registry Path: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\EXPLORER.EXE
  • DWORD: DontUseDesktopChangeRouter
  • Value: 1
     

Exclude RemoteApp:

  • Registry Path: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\<main app EXE file>
  • DWORD: DontUseDesktopChangeRouter
  • Value: 1
3

Comments (0 comments)

Please sign in to leave a comment.