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 for the response! Can I attempt this solution now? I'm happy to run through our pre-release of the documentation to see how it works before you publish it.
thanks
mshepherd Absolutely. That's been in the code for a while, so should "just work".
- Mtollex70Dec 17, 2020Brass Contributor
adam222 Yes, i moved the "OneDriveSetup=C:\\Windows\\SysWOW64\\OneDriveSetup.exe /thfirstsetup" from the Run key of the default user profile to the RailRunonce key in GPO instead. But i suspect its enough to just remove it, and not set it in RailRunonce. I had no time yesterday to check this, but will now. 🙂 Thanx for your reply!
- adam222Dec 16, 2020Copper Contributor
Mtollex70 Hi, I tried the deletion of run keys in the default user hive and works for me. I deleted entries for Run and RunOnce though as there was another OneDrive entry in there. I will test and see if I need to delete both.
One thing to note, if you delete the reg keys above, and you also use the host pool for a desktop, you may need to use a GPO to launch OneDrive for normal logons..
- adam222Dec 16, 2020Copper Contributor
Mtollex70 I am having the same problem. First login hangs on preparing Windows for 5 or so minutes. When RemoteApp opens, OneDrive is not configured. But on subsequent logons, it's there.
I can see in task manager that the renounce.exe is running for the user. I'd I kill renounce.exe in those 5 minutes while it's "preparing windows" it logs on successfully straight away.
I cannot work out why the runonce task is holding the login...
Any thoughts?
- Mtollex70Dec 16, 2020Brass Contributor
bnicholson80 Are you sure you didnt do anything else in this process? I've been struggling with this problem for a while, feel i have tried everything, including now your solution. Still 5 min on first login, 20-sek on logins after that. 😞 And OneDrive does not work on first login.
- bnicholson80Oct 21, 2020Copper Contributor
Baljit, I believe I found a solution to this hang on RemoteApp application launch for new users with OneDrive integrated using the RailRunonce method.
- Load the default user profile hive into your registry editor.
- From within the default user profile hive, browse to Software\Microsoft\Windows\CurrentVersion\RunOnce
- There you will find the issue. In the RunOnce key of the Default profile hive is the below string value.
- New accounts logging in for the first time are having the above run automatically when it builds the new user profile. This combined with RailRunonce causes the Runonce wrapper to hang up.
- Delete this string value from the default profile hive.
- Unload the default user profile hive in your registry editor.
- Attempt to launch a RemoteApp with a new user account.
- My initial logins went down from 5+ minutes to just 25 seconds by removing this string value from the default registry hive.
- Also to note, OneDrive works on first login which is a bonus!
- ronald2424Jun 05, 2020Copper ContributorThank you for your input..
I am trying to use One Drive as a File Explorer substitute.
The initial launch and setup works perfectly. But when you try to launch One Drive subsequently, it gets launched in the system tray with no option to relaunch it onto the Desktop in File Explorer view. This would allow the users to K access the files in network shares.
Will really appreciate if someone can confirm if this is possible and point me to the right direction. - DannyBoy65Jun 04, 2020Copper Contributor
Hi,
In my case, I´m relying on sharepoint and synced document libraries for that. So remote users save their documents to the server´s onedrive (I have a per user installation, but will be trying the per machine installation soon on another implementation), onedrive syncs to sharepoint and SP syncs to the user´s workstation.
- ronald2424Jun 04, 2020Copper Contributor
Hi,
I applied the 3 registry settings for One Drive. However when the app is selected it does not open as a window for the users as they need to do map to network drives. Is that possible to achieve?
RD
- Alex JanesMar 18, 2020Copper Contributor
I tried that. It seems like OneDrive still opens and hangs once for every user at first login. Is this script all you had to change to make it work?
- Rhys WilliamsFeb 26, 2020Iron Contributor
We have been experiencing the same issues. We've tried using the reg keys however it doesnt work on the first login, it does then work if a user logs out and back in again.
The solution we have found is to publish a bat script as the remote app that launches the target app and also restarts the OneDrive sync client. This works on the first login from a clean profile:
@echo off cd "%ProgramFiles%\Windows NT\Accessories\" start wordpad.exe taskkill /F /FI "USERNAME eq %username%" /IM OneDrive.exe cd "C:\Program Files (x86)\Microsoft OneDrive\" start OneDrive.exe /background exit
While this is quite dirty but it certainly does the job, better than making all users login once and then log out and back in again for KFM and FoD to work.
- Robin HoboFeb 20, 2020Copper Contributor
Marcel Biebricher That did the trick, thanks! More people on other forums are talking about this setting as well, however, as you mentioned no documentation about what the value 2 means.
- Johan VoermanDec 14, 2019Copper Contributor
Robin Hobo we have same problem. But this isn't a onedrive problem. For example we use printix in a environment with the same Railrunonce. Also in this case the first logon attempt is stuck. After that it's ok.
Anyone idea's? - Marcel BiebricherDec 06, 2019Copper ContributorSetting EnableADAL=2 fixed the problem regarding RemoteApp for us in a Parallels on-prem environment with Server 2019. Not related(?) but the correct configuration here: https://support.office.com/en-us/article/error-code-0x8004deb4-when-signing-in-to-onedrive-for-business-e8a8d97c-a87e-4dda-a67e-bae4fef05dcb
Cannot find any info on what the value “2” means, maybe MS can comment? - Robin HoboNov 14, 2019Copper Contributor
I have exactly the same problem. WVD environment with Windows 10 multi-user session custom image (without O365 applications) with latest updates (including 1909 version). No FSLogix in place (we don't use O365 apps within th WVD environment).
Customer has an application (non Microsoft) and wants to access files to open from OneDrive. Installed the OneDrive per machine (latest version) and applied te following reg keys for silent account config;
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive]
"SilentAccountConfig"=dword:00000001
"FilesOnDemandEnabled"=dword:00000001And the following for remote apps;
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RailRunonce]
"OneDrive"="\"C:\\Program Files (x86)\\Microsoft OneDrive\\OneDrive.exe\" /background"On question, does the last registry key be a "REG_ZG" or a "REG_EXPAND_SZ" type?
Anyway, in both cases it is not working. If I go within the app to File > Open I see OneDrive, but it is not configured / user is not signed in. I also see the OneDrive system icon from the WVD environment in my local system tray (not logged in). If I publish OneDrive.exe as a RemoteApp and start this app, OneDrive is configired correctly and OneDrive files became also available in the first RemoteApp.
When publising the full desktop everyting is working fine!
One other problem that a have and wat Baljit montioned is the hang on "Preparing Windows". This will take up to 5 minutes! This problem is only with a RemoteApp and not with a Published Desktop. This problem started when installing the OneDrive per Machine installation. If I remove OneDrive from the Hostpool, the problem is gone. No strange errors in the EventLog.
- Baljit AujlaNov 06, 2019Copper Contributor
Hi Randy,
Have adding the key:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RailRunonce\
OneDrive \ REG_SZ \ "C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe" /background
This works for all existing issues - where a profile has been created previously.
However, for any new user during logon the user session will 'hang' on the process "Run Once Wrapper"
The remote desktop client will continue with the message: "Configuring remote session..."
If you kill the Run Once Wrapper the user will login and there doesn't seem to be an issue after that.
Have you or anyone else seen this issue?
- 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!