Forum Discussion
Start OneDrive when using a RemoteApp in WVD
- Sep 26, 2019
We are in the process of documenting how to auto-start OneDrive in a Remote App scenario.
We will be documenting the following registry entry:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RailRunonce
I believe this works the same as the regular run keys, except that anything listed under this key will be launched when the remote session starts.
What happens is that in a remote session, Explorer.exe is not used as the Windows shell. rdpshell.exe is run instead. rdpshell.exe does not process Run entries. It does do the RailRunonce key though.
 
racook . Thanks Again for this. it's working like a champ - the only change i'd like to see is that now it does pop File Explorer when you open an app. Is there any way around that? Will it honor the /background parameter?
Yes. You'll want to duplicate the entry that is in the normal HKCU\Software\Microsoft\Windows\CurrentVersion\Run key.
REG_SZ: "OneDrive" <path to onedrive.exe> /background
- JeremyEspositoOct 30, 2019
Microsoft
RubenGr Thanks for the update and clarification. The scenario you described would need to be further investigated by O365 support. Please file a support case for this issue.
 - RubenGrOct 30, 2019Copper Contributor
Hi JeremyEsposito,
Sorry for the misunderstanding.,,
I try to explain our scenario again, since WVD isn't available in Europe yet we use the 2019 Remote Desktop Services to let users connect to a Windows 2019 Remote Desktop Server (RDS).
So at the beginning our their workday our users startup their ThinClient and connect to a RDS... on that server I deployed Office 365 ProPlus, Teams machine-wide Installer and the OneDrive client (using the /ALLUSER parameter).
I need this system to be as uniform as it can be, because users from multiple (federated) companies log in to this server.
All other applications (specifically for the different companies) will be published trough multiple Remote App Servers (RAS)
- Company A uses custom application A
- Company B uses custom application B
On these RAS users need to import for example some Excel files which they saved in there Documents of Desktop folders (on the RDS). So therefor I've also deployed OneDrive on the RAS environment.
So for example:A user is logged in to the RDS and starts RemoteApp A, after it is started this user needs to import a Excel file which he saved on the RDS Desktop (in my opinion only accessible through the OneDrive client, which works fine0). So importing the Excel file from the RDS Desktop, it generates some output (for example a .txt file). The users needs to save this file and wants to use this after closing the RemoteApp. If it is saved on the RAS Desktop without the OneDrive client available it will be saved on the RAS servers desktop where the users can't get to.
The thing is, as the file is saved on the RAS (OneDrive) Desktop, the RemoteApp is closed. Coming back on the RDS Desktop the .txt file isn't visible. I can trigger a sync by for example create a new folder on the RDS Desktop. Seconds after that the .txt file will become visible. But this isn't a workable way for these normal users. - JeremyEspositoOct 25, 2019
Microsoft
Using OneDrive as a remote app isn't necessary or useful because it's not an app that users will interact with (like MS word, excel, etc) and/or access their files from.
Nor does the OneDrive remote app sync to the desktop or remote session.
This is why we have removed OneDrive remote app from the remote desktop list in the latest version.OD sync is essentially just a utility to keep the files synced to/from the cloud and monitor sync status.
The OneDrive sync client should be running within the WVD session so it will sync files within the session.
Monitoring sync status should also be done within the WVD session or local computer.When a user is on a local computer and launches an Office remote app (say MS-Word) then goes to File> Open>OneDrive-Tenant OR Sites-Tenant>(some folder), MS-Word uses the O365 connected service to connect to that users OneDrive or SPO site and works with/saves that file in the cloud directly. OneDrive sync client running on the local computer and remote session will then sync the file from the cloud.In these use-cases, the OneDrive sync client remote app is really not needed. - RubenGrOct 25, 2019Copper Contributor
Hi JeremyEsposito,
I checked the settings of both OneDrive clients (in RDS & RAS) and they both have the backup feature enabled.
Saving a file on the RAS Desktop works fine, checking the content of my desktop online shows the newly saved file. But after closing the RemoteApp the desktop on the RDS isn't updated, this only happens after logging off the RDS session.Logging back on the RDS session the desktop is synced and the saved file is availible. I looks like the OneDrive client on RDS won't sync since the client on the RAS did sync earlier.
To test this senario I changed the internet connection on our RAS Server so that it communicates over another ipaddress. And what do you think.... the files are synced directly to the RDS desktop.
 - JeremyEspositoOct 24, 2019
Microsoft
RubenGr Thanks for the post!
It sounds like the OneDrive sync backup feature is not configured on the users RDS, and is configured on the local computer. (or vise-versa)
Review this document and confirm if the OneDrive sync backup feature is configured in both environments.
Hope this helps!
 - RubenGrOct 24, 2019Copper Contributor
Hi Guys,
I'm new here, but also experiencing similar issues with the OneDrive client in our RDS 2019 environment.
Users in our company login to a RDS session which seems to work fine, next they will start a RemoteApp (OneDrive will also start in the background of this RAS session).
As they modify and save files through the RAS session (Excel files, saved on there RAS desktop -> which is the Desktop in OneDrive), these files aren't visible in there RDS session after closing the RemoteApp.
Checking the OneDrive content on a laptop or online (https://xxx-my.sharepoint.com/personal/xxx/_layouts/15/onedrive.aspx) does show the saved file from the RAS session.
So it seems that the OneDrive client in the RAS environment is synced, but the OneDrive client in the RDS environment isn't. Opening the OneDrive application in the RDS session does trigger a sync and will make the saved files from the RAS session visible in their RDS session.
Note: We are using FSLogix technology with concurrent Profile & O365 containers, also I implemented the reg key as mentioned by racook
Who can help me solving this sync issue between our RAS and RDS environment? - mirthrockOct 02, 2019Brass ContributorThanks for all the help and input everyone. Just to be clear, Do I have to create the RailRunOnce key under HKLM\SYSTEM\CurrentControlSet\Control\Terminal Servert? It doesn't seem to be an existing key on my Remote Desktop server.
 - Brent CarlsonOct 02, 2019Copper Contributor
Adding the registry key worked great for me as well, thanks!